mirror of
https://github.com/fofolee/uTools-quickcommand.git
synced 2025-06-07 21:46:12 +08:00
修复快速双击两次命令卡片或者新建按钮时导致命令显示异常的BUG
This commit is contained in:
parent
05402fed3d
commit
4c2f835222
@ -167,6 +167,8 @@ export default {
|
|||||||
},
|
},
|
||||||
// 编辑命令
|
// 编辑命令
|
||||||
editCommand(commandOrCode) {
|
editCommand(commandOrCode) {
|
||||||
|
// 防止多次触发
|
||||||
|
if (this.isEditorShow) return;
|
||||||
// 即可传入 code,也可直接传入 command
|
// 即可传入 code,也可直接传入 command
|
||||||
const command =
|
const command =
|
||||||
typeof commandOrCode === "string"
|
typeof commandOrCode === "string"
|
||||||
@ -182,6 +184,8 @@ export default {
|
|||||||
},
|
},
|
||||||
// 新建命令
|
// 新建命令
|
||||||
addNewCommand(program = "quickcommand") {
|
addNewCommand(program = "quickcommand") {
|
||||||
|
// 防止多次触发
|
||||||
|
if (this.isEditorShow) return;
|
||||||
this.editorComponent =
|
this.editorComponent =
|
||||||
program === "quickcomposer" ? "ComposerEditor" : "CommandEditor";
|
program === "quickcomposer" ? "ComposerEditor" : "CommandEditor";
|
||||||
this.commandManager.state.currentCommand =
|
this.commandManager.state.currentCommand =
|
||||||
|
Loading…
x
Reference in New Issue
Block a user