CHANGELOG.md
5.24 KB
components 优化 — 修改记录
规划阶段尚未开始代码改动。实施后按 Phase 追加条目。
[Planning] 2026-07-06 — 初始规划文档
变更类型
- 文档 / 规划(无业务代码改动)
变更摘要
完成 components/ 全局组件审计,输出脑图、流程图、测试用例规格、全局影响矩阵与分批修改规划。
产出物
-
docs/components-optimization/README.md— 主规划文档 -
docs/components-optimization/CHANGELOG.md— 本文件 -
README.md的 Phase 章节 — 后续范围与顺序
关键结论
| 编号 | 决策 |
|---|---|
| C-01 | CalendarMonthSingle 可合并进 CalendarMonth |
| C-08 | collegeScene RemarkPopup 不可合并,应重命名为 PasswordPopup |
| C-09 | Merchant-Seles 需逐页迁移,不可一次性替换 |
测试
- 自动化:尚未编写(Phase 0 前置)
- 手动:尚未执行
备注
- 用户要求:先不做代码改动,先确认流程图、脑图、测试用例与全局影响
- 下一步:评审通过后进入 Phase 0(仅写测试)
[Phase 1] 2026-07-06 — CalendarMonthSingle + Popup 合并 + 全局下沉
变更类型
- 合并组件 / [x] 删除组件 / [x] 下沉注册 / [x] 重命名
变更摘要
删除 CalendarMonthSingle、tipsPopup、tabPopup;CalendarMonth 增加 monthOnly;Popup 超集化(footerMode);Confirm/date-picker/qr-box 从 app.json 下沉;collegeScene 密码弹窗重命名为 PasswordPopup。
测试
- 自动化:
npm run test:components— 12/12 PASS
兼容性(2026-07-06 补充)
- 见 COMPATIBILITY.md:packOptions.include、popup 子组件 json 注册、本地 close 图标、CSS 变体、布尔属性写法
[Hotfix] 2026-07-06 — close.png 改回本地包路径
变更类型
- 修复 CDN 404
变更摘要
rootImageUrl('close.png') 指向未上传的 CDN 路径;改回 CLOSE_ICON_URL(/components/images/close.png)。
测试
- 自动化:
npm run test:components— 含componentsImageUrl.test.mjs
[Hotfix] 2026-07-06 — CalendarMonth monthOnly 合并与修复
变更类型
- 合并组件 / [x] 修复交互 / [x] 修复 UI
变更摘要
CalendarMonthSingle 合并进 CalendarMonth(monthOnly + Calendar_Function_monthOnly)。修复项:attached 读 this.properties 实例化 monthOnly 逻辑;monChoose/done 走 dateType=single;WXML 不绑 end/select;单选四角圆角样式;close 图标改本地 CLOSE_ICON_URL。
测试
- 自动化:
npm run test:components— CAL-01/02/05
[Phase 2] 2026-07-06 — 技师 / SideSelect / storePicker 合并
变更类型
- 合并组件 / [x] 删除组件 / [x] 提取 helpers
变更摘要
-
2.1 删除
ArtificerSelectPopup/,统一为TechnicianSelectPopup+idKey(technicianId|uuid);清理updateOrderInfox2 无效注册 -
2.2 删除
SideSelectByPagePopup/,SideSelectPopup增加dataSource(prop|page);tabIndex/equityPage 改dataSource="page" -
2.3 删除 staffDaily/upgradeStaffDaily 本地
storePicker/副本,全局storePicker扩展pickerType/merchantRangeListTotal
文件清单
- 新增:
technicianSelect.helpers.js、sideSelect.helpers.js、storePicker.helpers.js - 新增:
tests/technicianSelect.helpers.test.mjs、tests/sideSelectDataSource.test.mjs、tests/storePickerConfirm.test.mjs - 删除:
ArtificerSelectPopup/、SideSelectByPagePopup/、2× 本地storePicker/
测试
- 自动化:
npm run test:components— 30/30 PASS
手动回归
- 见 REGRESSION.md §七 M2-01 ~ M2-05
[Phase 2.4] 2026-07-06 — Calendar 合并进 CalendarMonth
变更类型
- 合并组件 / [x] 删除组件 / [x] 提取 helpers
变更摘要
- 删除
components/Calendar/,全局calendar改指CalendarMonth - 新增
dayOnlyprop(默认true,对齐原全局 Calendar);monthOnly优先 -
operatingShow显式dayOnly="{{ false }}"保留日/月切换 - 移植
resetData、disabled、maxDayRange至 CalendarMonth - tabDate/components/calendar(apprManage 排班历)评估为第三套,本批保留不合并
测试
- 自动化:
npm run test:components— 33/33 PASS(含 CAL-06~08)
手动回归
- 见 REGRESSION.md §八 M2.6-01 ~ M2.6-05
[Phase 2.5] 2026-07-06 — CalendarMonth 日选择渲染性能
变更类型
- 性能优化 / [x] 提取 helpers
变更摘要
-
Lazy init:首次打开弹层才
setMonthList,attached 不再构建全量月份 -
合并 setData:
buildAllMonthsMeta一次 setData(原 ~69 次循环 setData) -
DOM 虚拟化:dayOnly 单月渲染;全功能三窗 swiper(
displayMonths) - dayOnly 跳过 yearList 构建
-
日格精简:
rangeLabel+ CSS variable--calender-color,减少嵌套 view - 弹层
hidden改wx:if="{{show}}"
测试
- 自动化:
npm run test:components— 38/38 PASS(含 CAL-10~13)
手动回归
- 见 REGRESSION.md §九 M2.7-01 ~ M2.7-04