diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 00f9c9d..8bfdb32 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -17,10 +17,10 @@ jobs: with: node-version: '22' - - name: Install dependencies and build + - name: Install dependencies and build web app run: | npm install - npm run build + VITE_APP_BASE_URL=/yys-editor/ npm run build:app - name: Deploy to temporary directory uses: appleboy/scp-action@v0.1.6 diff --git a/.github/workflows/deploy_dev.yml b/.github/workflows/deploy_dev.yml index 2d4d9a2..cb9f686 100644 --- a/.github/workflows/deploy_dev.yml +++ b/.github/workflows/deploy_dev.yml @@ -18,10 +18,10 @@ jobs: with: node-version: '22' - - name: Install dependencies and build + - name: Install dependencies and build web app run: | npm install - npm run build + VITE_APP_BASE_URL=/yys-editor-dev/ npm run build:app - name: Deploy to temporary directory uses: appleboy/scp-action@v0.1.6 diff --git a/docs/test/acceptance.md b/docs/test/acceptance.md index bc76fe8..6bf754d 100644 --- a/docs/test/acceptance.md +++ b/docs/test/acceptance.md @@ -193,18 +193,18 @@ - [x] 用户素材删除与持久化通过(删除后刷新不复活)。 - [ ] 缺失资产降级策略通过(不阻断导出/渲染)。 - [x] Dynamic Group 分组基础行为通过(分组信息写入 `meta.groupId`,复制分组会携带组内节点)。 -- [ ] 分组规则静态检查通过(冲突与供火提示正确且可实时更新)。 -- [ ] 规则管理通过(规则列表表格化、弹窗编辑、导入导出可用)。 +- [x] 分组规则静态检查通过(冲突与供火提示正确且可实时更新)。 +- [x] 规则管理通过(规则列表表格化、弹窗编辑、导入导出可用)。 - [ ] 矢量节点快速缩放性能回归通过(无明显卡顿/卡死)。 -- [ ] 导出到 wiki 数据兼容通过(wiki 侧可 normalize 与预览)。 +- [x] 导出到 wiki 数据兼容通过(wiki 侧可 normalize 与预览)。 - [ ] 跨项目素材互通通过(同 origin 可复用素材,跨 origin 不互通)。 - [ ] 跨项目规则互通方案确认(共享配置源定义、两侧读取一致)。 - [x] 导出图片时隐藏 Dynamic Group 通过(导出前隐藏,导出后恢复)。 当前状态(2026-02-27): -- 已通过:5 项(基础启动与构建、用户素材上传与使用、用户素材删除与持久化、Dynamic Group 分组基础行为、导出图片时隐藏 Dynamic Group)。 +- 已通过:8 项(基础启动与构建、用户素材上传与使用、用户素材删除与持久化、Dynamic Group 分组基础行为、分组规则静态检查、规则管理、导出到 wiki 数据兼容、导出图片时隐藏 Dynamic Group)。 - 部分通过:1 项(跨项目规则互通方案确认)。 -- 未通过/待验证:7 项(其余项待完整手测或跨仓联调)。 +- 未通过/待验证:4 项(其余项待完整手测或跨仓联调)。 逐项状态: - 基础启动与构建:已通过 @@ -213,10 +213,10 @@ - 用户素材删除与持久化:已通过 - 缺失资产降级策略:未通过(待手测) - Dynamic Group 分组基础行为:已通过 -- 分组规则静态检查:未通过(待手测) -- 规则管理(表格化/导入导出):未通过(待手测) +- 分组规则静态检查:已通过 +- 规则管理(表格化/导入导出):已通过 - 矢量节点快速缩放性能回归:未通过(待手测) -- 导出到 wiki 数据兼容:未通过(待跨仓联测) +- 导出到 wiki 数据兼容:已通过(2026-02-27 联测通过) - 跨项目素材互通:未通过(待同 origin 联测) - 跨项目规则互通方案确认:部分通过(yys-editor 已落地,wiki 待读取同源配置) - 导出图片时隐藏 Dynamic Group:已通过 diff --git a/vite.config.js b/vite.config.js index 5c45e1d..aba131c 100644 --- a/vite.config.js +++ b/vite.config.js @@ -3,8 +3,15 @@ import { fileURLToPath, URL } from 'node:url' import { defineConfig } from 'vite' import vue from '@vitejs/plugin-vue' +const normalizeBase = (value) => { + if (!value || value === '/') return '/' + const withLeadingSlash = value.startsWith('/') ? value : `/${value}` + return withLeadingSlash.endsWith('/') ? withLeadingSlash : `${withLeadingSlash}/` +} + // https://vitejs.dev/config/ export default defineConfig({ + base: normalizeBase(process.env.VITE_APP_BASE_URL || '/'), plugins: [ vue(), ],