From 9683b940bfd37e696568e96b65de88a16279734b Mon Sep 17 00:00:00 2001 From: woshiqp465 Date: Mon, 15 Sep 2025 21:35:49 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E9=85=8D=E7=BD=AE=E5=BC=80=E5=8F=91?= =?UTF-8?q?=E7=8E=AF=E5=A2=83=E5=92=8C=E6=B8=85=E7=90=86=E9=A1=B9=E7=9B=AE?= =?UTF-8?q?=E7=BB=93=E6=9E=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 修改默认路由重定向到首页 (/home) - 配置开发服务器使用5667端口 - 整理测试文件到temp-tests目录 - 优化项目结构便于开发和部署 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- apps/web-finance/src/router/routes/core.ts | 2 +- apps/web-finance/vite.config.mts | 3 +- .../test-analytics-complete.js | 0 .../test-analytics-debug.js | 0 .../test-analytics-features.js | 0 .../test-analytics-final.js | 0 .../test-auto-login.js | 0 .../test-category-stats-fixed.js | 0 .../test-category-stats.js | 0 .../test-check-menu-full.js | 0 test-check.js => temp-tests/test-check.js | 0 .../test-clear-cache-menu.js | 0 .../test-complete.js | 0 .../test-console-errors.js | 0 .../test-create-transaction.js | 0 test-direct.js => temp-tests/test-direct.js | 0 .../test-error-final.png | Bin test-error.png => temp-tests/test-error.png | Bin .../test-expand-menu.js | 0 .../test-final-menu.js | 0 .../test-final-success.js | 0 .../test-menu-reload.js | 0 .../test-new-menu.js | 0 test-new-ui.js => temp-tests/test-new-ui.js | 0 .../test-quick-verify.js | 0 test-result.png => temp-tests/test-result.png | Bin .../test-results}/.last-run.json | 0 .../test-simple-menu.js | 0 test-simple.js => temp-tests/test-simple.js | 0 .../test-stats-final.js | 0 .../test-stats-simple.js | 0 .../test-transaction-final.js | 0 .../test-transaction-order.js | 0 .../test-transaction-page.js | 0 .../test-transaction.js | 0 .../test-with-slider.js | 0 test-horizontal-layout.html | 221 ------------------ 37 files changed, 3 insertions(+), 223 deletions(-) rename test-analytics-complete.js => temp-tests/test-analytics-complete.js (100%) rename test-analytics-debug.js => temp-tests/test-analytics-debug.js (100%) rename test-analytics-features.js => temp-tests/test-analytics-features.js (100%) rename test-analytics-final.js => temp-tests/test-analytics-final.js (100%) rename test-auto-login.js => temp-tests/test-auto-login.js (100%) rename test-category-stats-fixed.js => temp-tests/test-category-stats-fixed.js (100%) rename test-category-stats.js => temp-tests/test-category-stats.js (100%) rename test-check-menu-full.js => temp-tests/test-check-menu-full.js (100%) rename test-check.js => temp-tests/test-check.js (100%) rename test-clear-cache-menu.js => temp-tests/test-clear-cache-menu.js (100%) rename test-complete.js => temp-tests/test-complete.js (100%) rename test-console-errors.js => temp-tests/test-console-errors.js (100%) rename test-create-transaction.js => temp-tests/test-create-transaction.js (100%) rename test-direct.js => temp-tests/test-direct.js (100%) rename test-error-final.png => temp-tests/test-error-final.png (100%) rename test-error.png => temp-tests/test-error.png (100%) rename test-expand-menu.js => temp-tests/test-expand-menu.js (100%) rename test-final-menu.js => temp-tests/test-final-menu.js (100%) rename test-final-success.js => temp-tests/test-final-success.js (100%) rename test-menu-reload.js => temp-tests/test-menu-reload.js (100%) rename test-new-menu.js => temp-tests/test-new-menu.js (100%) rename test-new-ui.js => temp-tests/test-new-ui.js (100%) rename test-quick-verify.js => temp-tests/test-quick-verify.js (100%) rename test-result.png => temp-tests/test-result.png (100%) rename {test-results => temp-tests/test-results}/.last-run.json (100%) rename test-simple-menu.js => temp-tests/test-simple-menu.js (100%) rename test-simple.js => temp-tests/test-simple.js (100%) rename test-stats-final.js => temp-tests/test-stats-final.js (100%) rename test-stats-simple.js => temp-tests/test-stats-simple.js (100%) rename test-transaction-final.js => temp-tests/test-transaction-final.js (100%) rename test-transaction-order.js => temp-tests/test-transaction-order.js (100%) rename test-transaction-page.js => temp-tests/test-transaction-page.js (100%) rename test-transaction.js => temp-tests/test-transaction.js (100%) rename test-with-slider.js => temp-tests/test-with-slider.js (100%) delete mode 100644 test-horizontal-layout.html diff --git a/apps/web-finance/src/router/routes/core.ts b/apps/web-finance/src/router/routes/core.ts index d49d29a7..40000b02 100644 --- a/apps/web-finance/src/router/routes/core.ts +++ b/apps/web-finance/src/router/routes/core.ts @@ -35,7 +35,7 @@ const coreRoutes: RouteRecordRaw[] = [ }, name: 'Root', path: '/', - redirect: '/analytics/overview', + redirect: '/home', children: [], }, { diff --git a/apps/web-finance/vite.config.mts b/apps/web-finance/vite.config.mts index a17db3b4..c30915a5 100644 --- a/apps/web-finance/vite.config.mts +++ b/apps/web-finance/vite.config.mts @@ -5,12 +5,13 @@ export default defineConfig(async () => { application: {}, vite: { server: { + port: 5667, proxy: { '/api': { changeOrigin: true, rewrite: (path) => path.replace(/^\/api/, ''), // mock代理目标地址 - target: 'http://localhost:3000/api', + target: 'http://localhost:5667/api', ws: true, }, }, diff --git a/test-analytics-complete.js b/temp-tests/test-analytics-complete.js similarity index 100% rename from test-analytics-complete.js rename to temp-tests/test-analytics-complete.js diff --git a/test-analytics-debug.js b/temp-tests/test-analytics-debug.js similarity index 100% rename from test-analytics-debug.js rename to temp-tests/test-analytics-debug.js diff --git a/test-analytics-features.js b/temp-tests/test-analytics-features.js similarity index 100% rename from test-analytics-features.js rename to temp-tests/test-analytics-features.js diff --git a/test-analytics-final.js b/temp-tests/test-analytics-final.js similarity index 100% rename from test-analytics-final.js rename to temp-tests/test-analytics-final.js diff --git a/test-auto-login.js b/temp-tests/test-auto-login.js similarity index 100% rename from test-auto-login.js rename to temp-tests/test-auto-login.js diff --git a/test-category-stats-fixed.js b/temp-tests/test-category-stats-fixed.js similarity index 100% rename from test-category-stats-fixed.js rename to temp-tests/test-category-stats-fixed.js diff --git a/test-category-stats.js b/temp-tests/test-category-stats.js similarity index 100% rename from test-category-stats.js rename to temp-tests/test-category-stats.js diff --git a/test-check-menu-full.js b/temp-tests/test-check-menu-full.js similarity index 100% rename from test-check-menu-full.js rename to temp-tests/test-check-menu-full.js diff --git a/test-check.js b/temp-tests/test-check.js similarity index 100% rename from test-check.js rename to temp-tests/test-check.js diff --git a/test-clear-cache-menu.js b/temp-tests/test-clear-cache-menu.js similarity index 100% rename from test-clear-cache-menu.js rename to temp-tests/test-clear-cache-menu.js diff --git a/test-complete.js b/temp-tests/test-complete.js similarity index 100% rename from test-complete.js rename to temp-tests/test-complete.js diff --git a/test-console-errors.js b/temp-tests/test-console-errors.js similarity index 100% rename from test-console-errors.js rename to temp-tests/test-console-errors.js diff --git a/test-create-transaction.js b/temp-tests/test-create-transaction.js similarity index 100% rename from test-create-transaction.js rename to temp-tests/test-create-transaction.js diff --git a/test-direct.js b/temp-tests/test-direct.js similarity index 100% rename from test-direct.js rename to temp-tests/test-direct.js diff --git a/test-error-final.png b/temp-tests/test-error-final.png similarity index 100% rename from test-error-final.png rename to temp-tests/test-error-final.png diff --git a/test-error.png b/temp-tests/test-error.png similarity index 100% rename from test-error.png rename to temp-tests/test-error.png diff --git a/test-expand-menu.js b/temp-tests/test-expand-menu.js similarity index 100% rename from test-expand-menu.js rename to temp-tests/test-expand-menu.js diff --git a/test-final-menu.js b/temp-tests/test-final-menu.js similarity index 100% rename from test-final-menu.js rename to temp-tests/test-final-menu.js diff --git a/test-final-success.js b/temp-tests/test-final-success.js similarity index 100% rename from test-final-success.js rename to temp-tests/test-final-success.js diff --git a/test-menu-reload.js b/temp-tests/test-menu-reload.js similarity index 100% rename from test-menu-reload.js rename to temp-tests/test-menu-reload.js diff --git a/test-new-menu.js b/temp-tests/test-new-menu.js similarity index 100% rename from test-new-menu.js rename to temp-tests/test-new-menu.js diff --git a/test-new-ui.js b/temp-tests/test-new-ui.js similarity index 100% rename from test-new-ui.js rename to temp-tests/test-new-ui.js diff --git a/test-quick-verify.js b/temp-tests/test-quick-verify.js similarity index 100% rename from test-quick-verify.js rename to temp-tests/test-quick-verify.js diff --git a/test-result.png b/temp-tests/test-result.png similarity index 100% rename from test-result.png rename to temp-tests/test-result.png diff --git a/test-results/.last-run.json b/temp-tests/test-results/.last-run.json similarity index 100% rename from test-results/.last-run.json rename to temp-tests/test-results/.last-run.json diff --git a/test-simple-menu.js b/temp-tests/test-simple-menu.js similarity index 100% rename from test-simple-menu.js rename to temp-tests/test-simple-menu.js diff --git a/test-simple.js b/temp-tests/test-simple.js similarity index 100% rename from test-simple.js rename to temp-tests/test-simple.js diff --git a/test-stats-final.js b/temp-tests/test-stats-final.js similarity index 100% rename from test-stats-final.js rename to temp-tests/test-stats-final.js diff --git a/test-stats-simple.js b/temp-tests/test-stats-simple.js similarity index 100% rename from test-stats-simple.js rename to temp-tests/test-stats-simple.js diff --git a/test-transaction-final.js b/temp-tests/test-transaction-final.js similarity index 100% rename from test-transaction-final.js rename to temp-tests/test-transaction-final.js diff --git a/test-transaction-order.js b/temp-tests/test-transaction-order.js similarity index 100% rename from test-transaction-order.js rename to temp-tests/test-transaction-order.js diff --git a/test-transaction-page.js b/temp-tests/test-transaction-page.js similarity index 100% rename from test-transaction-page.js rename to temp-tests/test-transaction-page.js diff --git a/test-transaction.js b/temp-tests/test-transaction.js similarity index 100% rename from test-transaction.js rename to temp-tests/test-transaction.js diff --git a/test-with-slider.js b/temp-tests/test-with-slider.js similarity index 100% rename from test-with-slider.js rename to temp-tests/test-with-slider.js diff --git a/test-horizontal-layout.html b/test-horizontal-layout.html deleted file mode 100644 index 458a56fb..00000000 --- a/test-horizontal-layout.html +++ /dev/null @@ -1,221 +0,0 @@ - - - - 新建交易表单布局预览 - - - -
-

交易表单布局优化效果

- -
-
-

❌ 旧布局(需要上下滚动)

-
-
-
交易类型
-
收入 | 支出
-
-
分类
-
分类选择...
-
-
金额
-
金额输入框
-
-
货币
-
货币选择
-
-
日期
-
日期选择器
-
-
状态
-
状态选择
-
-
项目
-
项目输入
-
-
付款人
-
付款人选择
-
-
收款人
-
收款人选择
-
-
数量
-
数量输入
-
-
标签
-
标签选择
-
-
描述
-
描述文本框
-
-
-
- -
-

✅ 新布局(充分利用横向空间)

-
-
-
-
交易类型
-
💸 支出 | 💰 收入
-
-
-
金额
-
¥ 1,000.00
-
-
-
货币
-
¥ CNY | $ USD | ฿ THB | K MMK
-
-
- -
-
-
分类(平铺按钮)
-
- 💰 工资 - 🎁 奖金 - 💼 投资 - + 添加分类 -
-
-
- -
-
-
日期
-
2024-01-07
-
-
-
状态
-
✅ 已完成 | ⏳ 待处理 | ❌ 已取消
-
-
-
项目
-
项目名称(可选)
-
-
- -
-
-
付款人
-
选择或输入
-
-
-
收款人
-
选择或输入
-
-
-
数量
-
1
-
-
-
单价
-
自动计算
-
-
- -
-
-
标签
-
选择标签...
-
-
-
描述
-
描述信息(可选)
-
-
-
-
-
- -
-

📊 优化效果总结

-
    -
  • Modal宽度:从 600px 增加到 1200px,充分利用屏幕空间
  • -
  • 布局方式:从单列垂直布局改为多列横向布局
  • -
  • 行数优化:从 12+ 行减少到 5 行,大幅减少滚动
  • -
  • 字段分组: -
      -
    • 第1行:交易类型、金额、货币(核心字段)
    • -
    • 第2行:分类选择(平铺展示)
    • -
    • 第3行:日期、状态、项目
    • -
    • 第4行:付款人、收款人、数量、单价
    • -
    • 第5行:标签、描述
    • -
    -
  • -
  • 用户体验:所有字段一屏可见,无需滚动,操作更高效
  • -
-
-
- - \ No newline at end of file