fix(quickdock): 修复待办窗口在移动端↔桌面端切换后被吞不恢复
TodoWindow 的 visible/rows 由 watch(todoList) 驱动但缺少 immediate: true, 视口切换导致 QuickDock 整体 v-if 卸载重挂时,store 中 todoList 未变化 watch 不触发,visible 永远停留在初始 false。与 RunnerWindow/FileWindow 对齐补上 immediate: true,重挂载时按现有数据立即初始化。
This commit is contained in:
parent
2b84a7adf8
commit
15779be939
@ -306,6 +306,9 @@ watch(
|
||||
renderEntering(newTasks);
|
||||
busy.value = false;
|
||||
},
|
||||
{ flush: 'sync' }
|
||||
// immediate 必须存在:窗口随移动端↔桌面端切换卸载重挂时,
|
||||
// store 中 todoList 数据未变化不会触发 watch,需要立即按现有数据初始化,
|
||||
// 否则窗口会被“吞掉”(与 RunnerWindow/FileWindow 的 immediate: true 对齐)
|
||||
{ flush: 'sync', immediate: true }
|
||||
);
|
||||
</script>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user