mirror of
https://github.com/fofolee/uTools-quickcommand.git
synced 2025-06-08 22:51:25 +08:00
子输入框输入后清楚上一次的事件
This commit is contained in:
parent
e260d14a36
commit
0be0c8dd88
@ -166,6 +166,7 @@ export default {
|
|||||||
this.history.push(this.subInputValue);
|
this.history.push(this.subInputValue);
|
||||||
this.historyIdx = this.history.length;
|
this.historyIdx = this.history.length;
|
||||||
utools.setSubInputValue("");
|
utools.setSubInputValue("");
|
||||||
|
this.clear();
|
||||||
this.fire(command);
|
this.fire(command);
|
||||||
};
|
};
|
||||||
// 自动粘贴的情况下自动执行
|
// 自动粘贴的情况下自动执行
|
||||||
@ -239,19 +240,22 @@ export default {
|
|||||||
},
|
},
|
||||||
stopRun() {
|
stopRun() {
|
||||||
this.runResult = "";
|
this.runResult = "";
|
||||||
if (!!this.child) {
|
|
||||||
quickcommand.kill(this.child.pid);
|
|
||||||
}
|
|
||||||
quickcommand.closeWaitBtn?.();
|
|
||||||
quickcommand.closeWaitBtn = () => {};
|
|
||||||
if (!!this.subInputListener) {
|
if (!!this.subInputListener) {
|
||||||
this.subInputValue = "";
|
this.subInputValue = "";
|
||||||
utools.removeSubInput();
|
utools.removeSubInput();
|
||||||
document.removeEventListener("keydown", this.subInputListener, true);
|
document.removeEventListener("keydown", this.subInputListener, true);
|
||||||
}
|
}
|
||||||
|
this.clear();
|
||||||
|
},
|
||||||
|
clear() {
|
||||||
if (!!this.quickcommandListener) {
|
if (!!this.quickcommandListener) {
|
||||||
document.removeEventListener("keydown", this.quickcommandListener);
|
document.removeEventListener("keydown", this.quickcommandListener);
|
||||||
}
|
}
|
||||||
|
if (!!this.child) {
|
||||||
|
quickcommand.kill(this.child.pid);
|
||||||
|
}
|
||||||
|
quickcommand.closeWaitBtn?.();
|
||||||
|
quickcommand.closeWaitBtn = () => {};
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
unmounted() {
|
unmounted() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user