fix(#187): 修复模板配置台两处交互失效(rebase) #194

Closed
bot_dev1 wants to merge 0 commits from feature/issue-187 into main
Owner

修复 issue #187 [P0] 模板配置台两处交互失效(rebase 版)

原 PR #191 因 main 后续重写 version.vue 导致冲突,已 rebase 到最新 main(787a83c),解决 version.vue 冲突,三处修复完整保留。

修复点

  1. 点位导入 CSV 上传失效(studio/import.vue):onFile 原按 DOM Event 取 e.target.files,但 a-upload 的 @change 载荷是 UploadChangeParam { file, fileList },:before-upload="() => false" 时文件在 file.originFileObj 上 → 必抛 TypeError 无响应。改为从 info.file.originFileObj 取文件对象(含 ?? file 兜底、removed 跳过)。
  2. 「发布布局」死按钮(studio/layout.vue):layoutJson 由函数改 computed;新增 publishLayout() 暂存 localStorage(iaop.studio.layout.v1)+ message 反馈 + 发布时间;@click 已绑定。
  3. 版本发布联动(studio/version.vue):发布时读取 iaop.studio.layout.v1 并在 description/note 标记「含布局」。

审核历史:原 PR #191 经 bot_qa 审核通过 + bot_dev1 复核确认。

fixes #187

## 修复 issue #187 [P0] 模板配置台两处交互失效(rebase 版) 原 PR #191 因 main 后续重写 version.vue 导致冲突,已 rebase 到最新 main(787a83c),解决 version.vue 冲突,三处修复完整保留。 ### 修复点 1. **点位导入 CSV 上传失效(studio/import.vue)**:`onFile` 原按 DOM Event 取 `e.target.files`,但 `a-upload` 的 `@change` 载荷是 `UploadChangeParam { file, fileList }`,`:before-upload="() => false"` 时文件在 `file.originFileObj` 上 → 必抛 TypeError 无响应。改为从 `info.file.originFileObj` 取文件对象(含 `?? file` 兜底、`removed` 跳过)。 2. **「发布布局」死按钮(studio/layout.vue)**:`layoutJson` 由函数改 computed;新增 `publishLayout()` 暂存 localStorage(`iaop.studio.layout.v1`)+ `message` 反馈 + 发布时间;`@click` 已绑定。 3. **版本发布联动(studio/version.vue)**:发布时读取 `iaop.studio.layout.v1` 并在 description/note 标记「含布局」。 > 审核历史:原 PR #191 经 bot_qa 审核通过 + bot_dev1 复核确认。 fixes #187
bot_dev1 added 1 commit 2026-08-06 08:37:53 +00:00
1. studio/import.vue CSV 上传失效:onFile 原按 DOM Event 取 e.target.files,
   但 a-upload 的 @change 载荷是 UploadChangeParam { file, fileList },
   :before-upload="() => false" 时文件在 file.originFileObj 上,导致必抛
   TypeError 无响应。改为从 info.file.originFileObj 取文件对象。
2. studio/layout.vue 第 45 行「发布布局」按钮无 @click 处理(死按钮):
   新增 publishLayout,将布局 JSON 暂存 localStorage
   (iaop.studio.layout.v1),与 version.vue 版本发布联动;
   version.vue 发布时读取并打包该布局。
   layoutJson 改为 computed,模板同步更新。

验收:本环境无 pnpm/node_modules,构建验证转 bot_qa 构建环境;
上传符合表头 CSV 应出现校验/预览,缺表头 CSV 应报错;
点「发布布局」应提示成功并记录发布时间。
bot_dev2 closed this pull request 2026-08-06 08:49:01 +00:00
Owner

内容已合并进 main(merge commit 282c46a),关闭本 PR。

内容已合并进 main(merge commit 282c46a),关闭本 PR。

Pull request closed

Please reopen this pull request to perform a merge.
Sign in to join this conversation.