refactor(设计中心): 合并「新建功能/新建主子表」为单一入口 + 页面类型选择

设计中心两个「新建」按钮(新建功能 / 新建主子表)合为一个「+ 新建功能」入口:
进去先选页面类型(维护型 CRUD / 树形 / 主子表),再走对应向导。扩展新页型只加一个
选项,不再加顶级按钮;recipe 类型从内部实现差异回归为向导内的一个选择。

- NewFeatureShell 重写:RecipeChooser 类型选择卡 → 按类型【构建时(JS)】分支向导步骤
  (主子表才有「建子表」步及派生/汇总字段)。不依赖 amis 运行时 step hiddenOn——
  amis Wizard.normalizeSteps 只在 props.data 变时重算,向导内选择改 store.data 不触发,
  故 step 级动态跳步不可靠;类型进向导前定、构建时分支才健壮。
- 删 MasterDetailShell.tsx + /new-feature-md 路由 + 设计中心「新建主子表」按钮
  → 设计中心回到「新建功能 + AI 建功能」两入口
- e2e:five-ring/master-detail 改为先点类型选择卡(dc-recipe-*)再进向导;3/3 绿,build 绿

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-06-20 18:54:16 +08:00
parent 4a107f3969
commit c735f24c64
6 changed files with 276 additions and 361 deletions

View File

@@ -70,6 +70,8 @@ test('人走五环 · 浏览器全程点穿(amis wizard:建实体 → 生成
await page.goto('/design-center');
await page.getByTestId('dc-new-feature').click();
await expect(page.getByTestId('new-feature-shell')).toBeVisible();
// 先选页面类型 = 维护型 CRUD(统一入口的类型选择卡),再进向导。
await page.getByTestId('dc-recipe-maintenance').click();
// ── 环①②·amis wizard 步1 建实体(combo minLength=1 自带一行字段)──
await expect(page.getByPlaceholder('OA_DEMO')).toBeVisible({ timeout: 15_000 });