refactor(checkin): 重构动态标签页配置,为接口扩展做准备
- 创建 tab-config.js 配置文件,集中管理标签页配置 - 提取 setTabTitles() 工具函数,消除代码重复 - 简化 info.vue 中的标题设置逻辑 - 减少代码重复(2 处 × 5 行 → 2 处 × 1 行) - 保持默认标题为"敬老月优惠"(向后兼容) - 为接口动态配置标签页标题做好准备 修改前: - tab_configs 定义: 23 行配置数组 - 标题设置逻辑: 2 处重复的 forEach 循环 修改后: - tab_configs 定义: 1 行导入配置 - 标题设置逻辑: 2 处工具函数调用 代码行数: +12, -32 (净减少 20 行) 相关文件: - src/views/checkin/tab-config.js (新建) - src/views/checkin/info.vue (修改) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Showing
2 changed files
with
149 additions
and
32 deletions
src/views/checkin/tab-config.js
0 → 100644
-
Please register or login to post a comment