mirror of
https://github.com/fofolee/uTools-quickcommand.git
synced 2025-09-28 07:05:03 +08:00
细节调整
This commit is contained in:
@@ -209,9 +209,8 @@ export default {
|
||||
this.routeData.action === "edit"
|
||||
? this.routeData.data
|
||||
: this.$utools.getDB(this.$utools.DBPRE.CFG + "codeHistory");
|
||||
quickCommandInfo = this.fillDefaultKeys(quickCommandInfo);
|
||||
Object.assign(this.quickcommandInfo, quickCommandInfo)
|
||||
this.$refs.editor.setEditorValue(quickCommandInfo.cmd);
|
||||
this.quickcommandInfo = quickCommandInfo;
|
||||
// 只有新建或运行时才保存记录
|
||||
if (this.routeData.action === "edit") return;
|
||||
utools.onPluginOut(() => {
|
||||
@@ -223,15 +222,6 @@ export default {
|
||||
);
|
||||
});
|
||||
},
|
||||
// 补充没有的键值
|
||||
fillDefaultKeys(command) {
|
||||
let commandKeys = Object.keys(command);
|
||||
Object.keys(this.quickcommandInfo).forEach((key) => {
|
||||
if (!commandKeys.includes(key))
|
||||
command[key] = this.quickcommandInfo[key];
|
||||
});
|
||||
return command;
|
||||
},
|
||||
// 绑定快捷键
|
||||
bindKeys() {
|
||||
let that = this;
|
||||
|
@@ -332,7 +332,6 @@ export default {
|
||||
);
|
||||
default:
|
||||
return commands.filter(
|
||||
// 可选链操作符
|
||||
(cmd) => cmd.tags?.includes(this.currentTag)
|
||||
);
|
||||
}
|
||||
|
Reference in New Issue
Block a user