### Task 2: 用公共 PageHeader 替换 G03 自建页头 **Files:** - Modify: `tests/g03-visual-states-contract.ps1` - Modify: `tests/g03-create-flow-contract.ps1` - Modify: `tests/g03-document-flow-contract.ps1` - Modify: `pages/genealogy/g03-create-genealogy.vue` **Interfaces:** - Consumes: Task 1 的 ``。 - Produces: G03 动态标题 `isAncestorStep ? "录入首代人物" : "创建家谱"`,以及现有 `goBack()` 对第一、第二步的业务分流。 - [ ] **Step 1: 将 G03 契约改成公共页头要求** 在 `tests/g03-visual-states-contract.ps1` 删除 `.flow-header__back`、`.flow-header__side` 和 `.flow-header__back-icon` 尺寸断言,改为: ```powershell Assert-Match -Content $g03 -Pattern '(?s)' -Message 'G03 must use PageHeader with its dynamic title and custom back handler' if ($g03 -match 'flow-header|flow-header__back|flow-header__title') { throw 'G03 must not retain a private header implementation' } ``` 在 `tests/g03-create-flow-contract.ps1` 的 required 项中加入: ```powershell 'import PageHeader from "@/components/PageHeader.vue";', ' ``` 在 `