From f4510d42254dc8582a979be7afc97b09fac6d82a Mon Sep 17 00:00:00 2001 From: chengwang15 Date: Tue, 29 Mar 2022 14:45:24 +0800 Subject: [PATCH] #164 shortcut keys are bound twice when there is only one notebook --- src/page/Workspace/Notebook/CellList/command.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/page/Workspace/Notebook/CellList/command.vue b/src/page/Workspace/Notebook/CellList/command.vue index 76859ce..2e6b1d1 100644 --- a/src/page/Workspace/Notebook/CellList/command.vue +++ b/src/page/Workspace/Notebook/CellList/command.vue @@ -72,7 +72,7 @@ export default { this.$shortcut.unbind('3') this.$shortcut.unbind('4') }, - bindAllKey () { + bindAllKey: debounce(function () { if (this.currentNotebook.id !== this.activeNotebookId) { return } else if (this.currentNotebook.type === 'workflow') { @@ -88,7 +88,7 @@ export default { this.$shortcut.bind('up', debounce(this.selectPrevCell, 200)) this.$shortcut.bind('down', debounce(this.selectNextCell, 200)) this.bindSomeKey() - }, + }, 200), bindSomeKey () { if (this.mode === 'command') { this.$shortcut.bind('A', debounce(this.insertCellUp, 200))