refactor: 移除重做/应用按钮, 自动应用更改, 删除死代码, 修复性能问题

UI 变更:
- 移除重做按钮及 redo/canRedo/redoStack 相关逻辑 (useCalendar, HeaderBar)
- 移除应用更改按钮, EventDetail 改为 watch form 自动应用 (deep watch)
- 用 syncing 标志防止 syncForm 回写时触发自动应用的循环

死代码清理:
- weekday.js: 移除未使用的 BYDAY_TO_INDEX 和 dowLabel
- date.js: 移除未使用的 toHHMM
- App.vue: 移除未使用的 .empty CSS
- DropZone.vue: 移除空的 .icon 容器及 CSS
- test/weekday.test.js: 移除对应死代码的 2 个测试用例

性能修复:
- WeekPreview: layoutEvents 从模板内联调用改为 computed (laidOutByDate),
  避免每次渲染重新计算布局
- MonthPreview: occByDate 过滤为仅网格内 42 天, 避免展开全部 occurrence

代码质量:
- useCalendar: prevMonth/nextMonth 合并为 shiftMonth(delta), 消除重复
- WeekPreview/MonthPreview: 移除未使用导入 (toISODate, toDate)
This commit is contained in:
zikai
2026-07-22 04:18:05 +00:00
parent add471eb44
commit 1c6ecf9d86
10 changed files with 111 additions and 136 deletions

View File

@@ -91,9 +91,4 @@ body {
}
.app-main { flex: 1; display: flex; overflow: hidden; }
.detail-area { flex: 1; overflow-y: auto; }
.empty {
text-align: center;
padding: 60px 20px;
color: #95a5a6;
}
</style>