Files
EmailBill/openspec/changes/archive/2026-02-17-unified-popup-component/proposal.md
SunCheng c49f66757e
Some checks failed
Docker Build & Deploy / Build Docker Image (push) Waiting to run
Docker Build & Deploy / Deploy to Production (push) Has been cancelled
Docker Build & Deploy / Cleanup Dangling Images (push) Has been cancelled
Docker Build & Deploy / WeChat Notification (push) Has been cancelled
1
2026-02-18 21:16:45 +08:00

34 lines
1.5 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
## Why
当前前端项目中虽然已经封装了统一的弹窗组件 `PopupContainer.vue`,但很多页面仍然直接使用 `van-dialog``van-popup` 或自行封装的弹窗组件(如 `AddClassifyDialog.vue``CategoryBillPopup.vue`),导致弹窗风格不统一,影响用户体验的一致性和代码可维护性。
## What Changes
- 将所有直接使用 `van-dialog` 的简单确认/输入弹窗替换为统一的弹窗组件
- 将所有使用 `van-popup` 的底部弹窗替换为 `PopupContainer` 组件
- 重构或删除自行封装的弹窗组件(`AddClassifyDialog.vue``CategoryBillPopup.vue`),改用统一的 `PopupContainer`
- 扩展 `PopupContainer` 组件功能以覆盖更多使用场景(如表单验证、确认对话框)
- 更新相关样式,确保统一的设计语言
## Capabilities
### New Capabilities
- `unified-popup-system`: 统一的弹窗系统,提供一致的用户体验和 API包括对话框、底部弹窗、确认弹窗等常见场景
### Modified Capabilities
## Impact
**影响范围**:
- `Web/src/views/` 目录下的多个 Vue 视图文件(至少 10+ 个文件)
- `Web/src/components/` 目录下的弹窗相关组件(`AddClassifyDialog.vue``CategoryBillPopup.vue`
- `Web/src/components/PopupContainer.vue` 组件扩展
**代码变更**:
- 重构约 42+ 处弹窗使用位置(来自 grep 搜索结果)
- 可能引入 Breaking Changes如果需要修改 `PopupContainer` 的 API
**依赖影响**:
- Vant UI 组件库保持不变,仅封装层变化
- 不影响后端 API