# G10 All-States Responsive Visual Implementation Plan > **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking. **Goal:** 修复 G10 列表卡框、双操作按钮和审核弹窗在 MuMu 中的拉伸、细条及标题正文连行问题,并覆盖全部审核状态。 **Architecture:** `AppButton` 提供默认关闭的紧凑九宫格变体,`AppDialog` 只在显式请求且存在双操作时消费该变体。G10 使用共享变体替换页面内直接图片按钮,并把列表、结果及状态卡全部迁移到真实素材九宫格边框。 **Tech Stack:** uni-app、Vue 3、SCSS、PowerShell 静态合同、MuMu Android 模拟器 ## Global Constraints - `AppButton.compact` 和 `AppDialog.compactActions` 默认值均为 `false`。 - 紧凑按钮切片固定为 `56 300 fill`,边框宽度固定为 `10rpx 26rpx`。 - G10 卡框切片固定为 `24 32`,边框宽度固定为 `18rpx 24rpx`。 - G10 双操作继续左右并排,按钮尺寸为 `148rpx × 68rpx`。 - G10 结果条尺寸为 `308rpx × 68rpx`。 - 不修改文案、模拟数据、路由、状态枚举、校验和审核逻辑。 - 视觉验收只使用 MuMu Android 原生画面。 - 不执行 Git 操作,不启用多代理。 --- ### Task 1: AppButton 紧凑九宫格变体 **Files:** - Create: `tests/app-button-compact-contract.ps1` - Modify: `components/AppButton.vue` - Test: `tests/shared-interaction-accessibility-contract.ps1` - Test: `tests/shared-component-document-flow-contract.ps1` **Interfaces:** - Consumes: `type: "primary" | "secondary"`、现有点击和禁用接口。 - Produces: `compact: Boolean = false`;根类 `app-button--compact`。 - [ ] **Step 1: 写入失败合同** 合同读取 `components/AppButton.vue` 并要求以下标记: ```powershell foreach ($token in @( 'compact: { type: Boolean, default: false }', "'app-button--compact': compact", 'border-image-slice: 56 300 fill;', 'border-width: 10rpx 26rpx;', 'a01-scroll-primary-v3.png', 'a01-scroll-secondary-v3.png' )) { if (-not $button.Contains($token)) { throw "AppButton compact contract missing: $token" } } ``` 并断言 `.app-button--compact .app-button__skin` 为 `display: none`。 - [ ] **Step 2: 运行合同并确认失败** Run: `powershell -NoProfile -ExecutionPolicy Bypass -File tests/app-button-compact-contract.ps1` Expected: FAIL,指出缺少 `compact`。 - [ ] **Step 3: 实现最小变体** 在属性中加入: ```js compact: { type: Boolean, default: false }, ``` 在根类对象中加入: ```js 'app-button--compact': compact ``` 为主/次紧凑按钮分别设置对应卷轴 `border-image-source`,共同使用: ```scss border-width: 10rpx 26rpx; border-style: solid; border-color: transparent; border-image-slice: 56 300 fill; border-image-width: 10rpx 26rpx; border-image-repeat: stretch; ``` 隐藏紧凑模式中的原图片皮肤,保留标签和原有事件。 - [ ] **Step 4: 运行组件合同** Run: ```powershell powershell -NoProfile -ExecutionPolicy Bypass -File tests/app-button-compact-contract.ps1 powershell -NoProfile -ExecutionPolicy Bypass -File tests/shared-interaction-accessibility-contract.ps1 powershell -NoProfile -ExecutionPolicy Bypass -File tests/shared-component-document-flow-contract.ps1 ``` Expected: 三项均输出 `PASS`。 ### Task 2: AppDialog 标题分行与显式紧凑双操作 **Files:** - Create: `tests/app-dialog-responsive-content-contract.ps1` - Modify: `components/AppDialog.vue` **Interfaces:** - Consumes: Task 1 的 `AppButton.compact`。 - Produces: `compactActions: Boolean = false`;`.app-dialog__copy` 独立文本容器。 - [ ] **Step 1: 写入失败合同** 合同要求: ```powershell foreach ($token in @( 'compactActions: { type: Boolean, default: false }', 'class="app-dialog__copy"', ':compact="compactActions && showCancel"' )) { if (-not $dialog.Contains($token)) { throw "AppDialog responsive contract missing: $token" } } ``` 并要求 `.app-dialog__copy` 为纵向 flex、宽度 `100%`,标题和说明为 `display: block; width: 100%`。 - [ ] **Step 2: 运行合同并确认失败** Run: `powershell -NoProfile -ExecutionPolicy Bypass -File tests/app-dialog-responsive-content-contract.ps1` Expected: FAIL,指出缺少 `compactActions`。 - [ ] **Step 3: 实现弹窗布局** 使用 `.app-dialog__copy` 包裹 eyebrow、title 和 message;在属性中加入: ```js compactActions: { type: Boolean, default: false }, ``` 两个 `AppButton` 都传入: ```vue :compact="compactActions && showCancel" ``` 单按钮因 `showCancel === false` 保持默认宽卷轴。 - [ ] **Step 4: 运行弹窗及共享合同** Run: ```powershell powershell -NoProfile -ExecutionPolicy Bypass -File tests/app-dialog-responsive-content-contract.ps1 powershell -NoProfile -ExecutionPolicy Bypass -File tests/shared-interaction-accessibility-contract.ps1 powershell -NoProfile -ExecutionPolicy Bypass -File tests/shared-component-document-flow-contract.ps1 ``` Expected: 三项均输出 `PASS`。 ### Task 3: G10 列表、结果与状态卡迁移 **Files:** - Modify: `pages/genealogy/g10-application-review.vue` - Modify: `tests/g10-all-states-visual-contract.ps1` - Modify: `tests/g10-document-flow-contract.ps1` - Test: `tests/g08-g10-application-flow-contract.ps1` - Test: `tests/g09-g10-business-state-contract.ps1` **Interfaces:** - Consumes: `AppButton compact`、`AppDialog compact-actions`。 - Produces: G10 九宫格卡框、左右紧凑操作、九宫格结果条和完整状态卡。 - [ ] **Step 1: 将 G10 合同切换到新契约** 删除 `g10-document-flow-contract.ps1` 对以下旧值的要求: ```text background ... list-slip-frame.png ... 100% 100% padding: 44rpx 52rpx 29rpx 64rpx ``` 在视觉/文档流合同中要求: ```text border-image-source: url("/static/assets/modules/genealogy/transparent/list-slip-frame.png") border-image-slice: 24 32 border-width: 18rpx 24rpx min-height: 218rpx margin-bottom: 12rpx body min-height: 182rpx gap: 8rpx 0 padding: 28rpx 28rpx 22rpx 40rpx