子输入框输入后清楚上一次的事件

This commit is contained in:
fofolee 2022-04-23 09:58:46 +08:00
parent e260d14a36
commit 0be0c8dd88

View File

@ -166,6 +166,7 @@ export default {
this.history.push(this.subInputValue);
this.historyIdx = this.history.length;
utools.setSubInputValue("");
this.clear();
this.fire(command);
};
//
@ -239,19 +240,22 @@ export default {
},
stopRun() {
this.runResult = "";
if (!!this.child) {
quickcommand.kill(this.child.pid);
}
quickcommand.closeWaitBtn?.();
quickcommand.closeWaitBtn = () => {};
if (!!this.subInputListener) {
this.subInputValue = "";
utools.removeSubInput();
document.removeEventListener("keydown", this.subInputListener, true);
}
this.clear();
},
clear() {
if (!!this.quickcommandListener) {
document.removeEventListener("keydown", this.quickcommandListener);
}
if (!!this.child) {
quickcommand.kill(this.child.pid);
}
quickcommand.closeWaitBtn?.();
quickcommand.closeWaitBtn = () => {};
},
},
unmounted() {