From df2b1f60312ca9160fbda288310ce95ddcb656bd Mon Sep 17 00:00:00 2001 From: que01 Date: Fri, 9 Oct 2026 17:53:47 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=A1=A5=E9=BD=90=E9=A4=90=E9=A5=AE?= =?UTF-8?q?=E9=A6=96=E9=A1=B5=E5=8F=AF=E7=BC=96=E8=BE=91=E5=8C=BA=E5=9F=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../tasks/coverage/coverage.csv | 13 +++++++++ apps/taro/test/browser/admin-editor.spec.ts | 11 ++++++++ .../config/src/generated-template-packages.js | 27 ++++++++++++++++++- .../taro/index.tsx | 8 +++--- .../template-acheng-campus-food/template.json | 25 +++++++++++++++++ 5 files changed, 79 insertions(+), 5 deletions(-) create mode 100644 .codex-tasks/visual-editor-closure/tasks/coverage/coverage.csv diff --git a/.codex-tasks/visual-editor-closure/tasks/coverage/coverage.csv b/.codex-tasks/visual-editor-closure/tasks/coverage/coverage.csv new file mode 100644 index 0000000..5ef8d34 --- /dev/null +++ b/.codex-tasks/visual-editor-closure/tasks/coverage/coverage.csv @@ -0,0 +1,13 @@ +template,page,visible_content,renderer_target,manifest_editor,source,status,evidence +acheng-campus-food,home,主理人身份、地点、出摊图片、餐品标题、首页操作按钮、承诺、业务卡片,food.home.identity; food.home.location; food.home.hero; food.home.offerings-heading; food.home.actions; food.home.promise-heading; acheng-campus-food.home.offering,对应 sections 已声明并补齐身份与操作目标,brand; offering; trust,已覆盖,契约测试 + 浏览器点选 +acheng-campus-food,offerings,菜单说明、业务卡片,acheng-campus-food.offerings.menu; acheng-campus-food.offerings.item,对应 sections 已声明,brand; offering,已覆盖,契约测试 + 浏览器点选 +acheng-campus-food,service,出摊说明、日程、配送、流程,acheng-campus-food.service.service; trust:schedule; trust:coverage; trust:process,对应 sections / trust declarations 已声明,brand; trust,待第二阶段复核,已存在浏览器点选路径 +acheng-campus-food,profile,主理人与信任内容,acheng-campus-food.profile.identity; trust:credential; trust:case; trust:promise,对应 sections / trust declarations 已声明,brand; trust,待第二阶段复核,已存在 renderer target +acheng-campus-food,detail,餐品详情、详情说明,acheng-campus-food.detail.dishDetail; acheng-campus-food.detail.detailCopy,对应 sections 已声明,offering; brand,已覆盖,浏览器已验证底栏与编辑入口 +acheng-campus-food,inquiry,页面文案、访客表单,acheng-campus-food.inquiry.booking,对应 section 已声明;Admin 已允许 inquiry section 编辑,brand; inquiry,首批已修复,浏览器已验证表单展示 +acheng-campus-food,success,提交结果文案,acheng-campus-food.success.successCopy,对应 section 已声明,brand,待第二阶段复核,已验证页面可切换 +acheng-campus-food,records,记录页文案,acheng-campus-food.records.recordsCopy,对应 section 已声明,brand; records,待第二阶段复核,已验证页面可切换 +linjing-editorial,home,身份、主视觉、证明、主张、案例,editorial.home.identity; editorial.home.hero; editorial.home.proof; editorial.home.manifesto; editorial.home.works; linjing-editorial.home.home,对应 sections 已声明,brand; trust; offering,已覆盖,契约测试 + 浏览器点选 +linjing-editorial,offerings,案例说明、业务卡片,linjing-editorial.offerings.cases; linjing-editorial.offerings.item,对应 sections 已声明,brand; offering,待第二阶段复核,已有 renderer target +linjing-editorial,profile,身份、履约、联系方式、信任内容,linjing-editorial.profile.identity; linjing-editorial.profile.profileDetails; trust:*,对应 sections / trust declarations 已声明,brand; trust,已覆盖,契约测试 + 浏览器点选 +linjing-editorial,detail,案例详情、详情说明,linjing-editorial.detail.projectDetail; linjing-editorial.detail.detailCopy,对应 sections 已声明,offering; brand,待第二阶段复核,已有 renderer target diff --git a/apps/taro/test/browser/admin-editor.spec.ts b/apps/taro/test/browser/admin-editor.spec.ts index f9a2b58..46dc1a7 100644 --- a/apps/taro/test/browser/admin-editor.spec.ts +++ b/apps/taro/test/browser/admin-editor.spec.ts @@ -194,6 +194,7 @@ const templateContent = { { key: "food.home.identity", label: "主理人身份" }, { key: "food.home.location", label: "服务地点" }, { key: "food.home.offerings-heading", label: "餐品区域标题" }, + { key: "food.home.actions", label: "首页操作按钮" }, ], fields: [ { @@ -224,6 +225,13 @@ const templateContent = { label: "招牌餐品标题", input: "text", }, + { + key: "primaryAction", + binding: "brand.config.visualPresentation.home.primaryAction", + previewTarget: "food.home.actions", + label: "咨询按钮", + input: "text", + }, ], }, ], @@ -353,6 +361,9 @@ test("Admin 按通用预览目标筛选字段并同步品牌草稿", async ({ pa ); await expect(actionButtons.nth(0)).toContainText("咨询 / 预订"); await expect(actionButtons.nth(1)).toContainText("查看餐品"); + await preview.locator('[data-editor-target="food.home.actions"]').click(); + await expect(page.getByLabel("咨询按钮")).toBeVisible(); + await page.keyboard.press("Escape"); await preview.locator('[data-editor-target="food.home.location"]').click(); await expect(page.getByText("出摊信息标题")).toBeVisible(); await expect(page.getByText("招牌餐品标题")).toHaveCount(0); diff --git a/packages/config/src/generated-template-packages.js b/packages/config/src/generated-template-packages.js index 6ff34c3..9e190e3 100644 --- a/packages/config/src/generated-template-packages.js +++ b/packages/config/src/generated-template-packages.js @@ -267,6 +267,10 @@ export const generatedTemplatePackageRegistry = [ "key": "food.home.offerings-heading", "label": "餐品区域标题" }, + { + "key": "food.home.actions", + "label": "首页操作按钮" + }, { "key": "food.home.promise-heading", "label": "出餐承诺标题" @@ -326,6 +330,27 @@ export const generatedTemplatePackageRegistry = [ "label": "招牌餐品标题", "input": "text" }, + { + "key": "moreAction", + "previewTarget": "food.home.offerings-heading", + "binding": "brand.config.visualPresentation.home.moreAction", + "label": "查看全部按钮", + "input": "text" + }, + { + "key": "primaryAction", + "previewTarget": "food.home.actions", + "binding": "brand.config.visualPresentation.home.primaryAction", + "label": "咨询按钮", + "input": "text" + }, + { + "key": "secondaryAction", + "previewTarget": "food.home.actions", + "binding": "brand.config.visualPresentation.home.secondaryAction", + "label": "餐品按钮", + "input": "text" + }, { "key": "manifestoTitle", "previewTarget": "food.home.promise-heading", @@ -2641,4 +2666,4 @@ export const generatedTemplatePackageRegistry = [ } ]; export const generatedTemplatePackageRegistryHash = - "4c99ea207a1a3689f19179ee3e56401585b838c2eeda237487943ca856dbbe52"; + "a0e75797819fae48ed9592704c7ab271725298617aca56fa9e674c132684dde2"; diff --git a/packages/template-acheng-campus-food/taro/index.tsx b/packages/template-acheng-campus-food/taro/index.tsx index e9bdfcb..3f185ab 100644 --- a/packages/template-acheng-campus-food/taro/index.tsx +++ b/packages/template-acheng-campus-food/taro/index.tsx @@ -29,12 +29,12 @@ function Home({ workspace }: { workspace: RuntimeWorkspace }) { {text(brand.address)} {p.stallTime && {p.stallTime}} - + @@ -57,7 +57,7 @@ function Home({ workspace }: { workspace: RuntimeWorkspace }) { {p.worksTitle || "可选餐品"} navigate("offerings")}> - 查看全部 › + {p.moreAction || "查看全部"} › diff --git a/packages/template-acheng-campus-food/template.json b/packages/template-acheng-campus-food/template.json index b30dee4..8f644b1 100644 --- a/packages/template-acheng-campus-food/template.json +++ b/packages/template-acheng-campus-food/template.json @@ -260,6 +260,10 @@ "key": "food.home.offerings-heading", "label": "餐品区域标题" }, + { + "key": "food.home.actions", + "label": "首页操作按钮" + }, { "key": "food.home.promise-heading", "label": "出餐承诺标题" @@ -319,6 +323,27 @@ "label": "招牌餐品标题", "input": "text" }, + { + "key": "moreAction", + "previewTarget": "food.home.offerings-heading", + "binding": "brand.config.visualPresentation.home.moreAction", + "label": "查看全部按钮", + "input": "text" + }, + { + "key": "primaryAction", + "previewTarget": "food.home.actions", + "binding": "brand.config.visualPresentation.home.primaryAction", + "label": "咨询按钮", + "input": "text" + }, + { + "key": "secondaryAction", + "previewTarget": "food.home.actions", + "binding": "brand.config.visualPresentation.home.secondaryAction", + "label": "餐品按钮", + "input": "text" + }, { "key": "manifestoTitle", "previewTarget": "food.home.promise-heading",