mirror of
https://github.com/kuaifan/dootask.git
synced 2026-07-22 05:59:58 +00:00
fix: 仪表盘待完成默认展开
This commit is contained in:
parent
95b20325be
commit
44bd541d00
@ -29,9 +29,8 @@ last_verified: v1.8.69
|
||||
## 默认策略
|
||||
仪表盘优先突出需要立即行动的任务:
|
||||
|
||||
- 有已超期或今日到期任务时,「待完成」默认收起。
|
||||
- 有已超期或今日到期任务时,「待开始」默认收起。
|
||||
- 其他显示出来的分组默认展开。
|
||||
- 包括「待完成」在内的其他显示分组默认展开。
|
||||
|
||||
## 记忆规则
|
||||
用户手动打开或收起后,该选择保存在当前浏览器并在当天优先于默认策略。日期变化后重新按默认策略计算。清除浏览器缓存、更换浏览器或更换设备不会保留这份状态。
|
||||
|
||||
@ -660,20 +660,16 @@ export default {
|
||||
|
||||
/**
|
||||
* 策略快照(行动优先):
|
||||
* - 显示的组默认展开;「待完成」量大且行动优先级低,超期或今日到期有数据时默认收起
|
||||
* - 显示的组默认展开;超期或今日到期有数据时,「待开始」默认收起
|
||||
*/
|
||||
takeSnapshot() {
|
||||
const counts = {
|
||||
overdue: this.dashboardTask.overdue_count,
|
||||
today: this.dashboardTask.today_count,
|
||||
todo: this.dashboardTask.todo_count,
|
||||
upcoming: this.upcomingTask.count,
|
||||
assist: this.assistTask.length,
|
||||
};
|
||||
const collapsed = [];
|
||||
if (counts.todo > 0 && (counts.overdue > 0 || counts.today > 0)) {
|
||||
collapsed.push('todo');
|
||||
}
|
||||
if (counts.upcoming > 0 && (counts.overdue > 0 || counts.today > 0)) {
|
||||
collapsed.push('upcoming');
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user