mirror of
https://github.com/kuaifan/dootask.git
synced 2026-02-22 08:20:31 +00:00
fix: 客户端任务独立窗口无法按command+s保存任务的问题
This commit is contained in:
parent
d1fdec0970
commit
fec116f131
@ -2,7 +2,7 @@
|
|||||||
<div class="electron-task">
|
<div class="electron-task">
|
||||||
<PageTitle :title="taskInfo.name"/>
|
<PageTitle :title="taskInfo.name"/>
|
||||||
<Loading v-if="loadIng > 0"/>
|
<Loading v-if="loadIng > 0"/>
|
||||||
<TaskDetail v-else :task-id="taskInfo.id" :open-task="taskInfo"/>
|
<TaskDetail v-else ref="taskDetail" :task-id="taskInfo.id" :open-task="taskInfo"/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -48,7 +48,10 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
//
|
document.addEventListener('keydown', this.shortcutEvent);
|
||||||
|
},
|
||||||
|
beforeDestroy() {
|
||||||
|
document.removeEventListener('keydown', this.shortcutEvent);
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapState(['cacheTasks']),
|
...mapState(['cacheTasks']),
|
||||||
@ -92,7 +95,15 @@ export default {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
},
|
||||||
|
shortcutEvent(e) {
|
||||||
|
if (e.metaKey || e.ctrlKey) {
|
||||||
|
if (e.keyCode === 83) {
|
||||||
|
e.preventDefault();
|
||||||
|
this.$refs.taskDetail.checkUpdate(true)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user