mirror of
https://github.com/fofolee/uTools-quickcommand.git
synced 2025-06-09 06:54:11 +08:00
导出时添加用户名
This commit is contained in:
parent
ec6e8bbabf
commit
b4aa6f9837
@ -310,7 +310,7 @@ export default {
|
|||||||
toggleCommandActivated() {
|
toggleCommandActivated() {
|
||||||
let event = {
|
let event = {
|
||||||
data: this.commandInfo.features.code,
|
data: this.commandInfo.features.code,
|
||||||
type:"toggle"
|
type: "toggle",
|
||||||
};
|
};
|
||||||
event.type = this.isCommandActivated ? "disable" : "enable";
|
event.type = this.isCommandActivated ? "disable" : "enable";
|
||||||
this.$emit("commandChanged", event);
|
this.$emit("commandChanged", event);
|
||||||
@ -327,16 +327,21 @@ export default {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
getAuthedCmd() {
|
||||||
|
let command = _.cloneDeep(this.commandInfo);
|
||||||
|
if (!command.authorName) command.authorName = utools.getUser().nickname;
|
||||||
|
return command;
|
||||||
|
},
|
||||||
// 导出到剪贴板
|
// 导出到剪贴板
|
||||||
exportCommandRaw() {
|
exportCommandRaw() {
|
||||||
utools.copyText(JSON.stringify(this.commandInfo, null, 4)) &&
|
utools.copyText(JSON.stringify(this.getAuthedCmd(), null, 4)) &&
|
||||||
quickcommand.showMessageBox("已复制到剪贴板");
|
quickcommand.showMessageBox("已复制到剪贴板");
|
||||||
},
|
},
|
||||||
// 导出到文件
|
// 导出到文件
|
||||||
exportCommandFile() {
|
exportCommandFile() {
|
||||||
window.saveFile(JSON.stringify(this.commandInfo), {
|
window.saveFile(JSON.stringify(this.getAuthedCmd()), {
|
||||||
title: "选择保存位置",
|
title: "选择保存位置",
|
||||||
defaultPath: `${this.commandInfo.features.explain}.json`,
|
defaultPath: `${this.getAuthedCmd().features.explain}.json`,
|
||||||
filters: [{ name: "json", extensions: ["json"] }],
|
filters: [{ name: "json", extensions: ["json"] }],
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
:name="tag"
|
:name="tag"
|
||||||
:content-class="
|
:content-class="
|
||||||
tag === '搜索结果' || activatedQuickPanels.includes(tag)
|
tag === '搜索结果' || activatedQuickPanels.includes(tag)
|
||||||
? 'text-indigo-10 text-weight-bolder'
|
? 'text-blue-7 text-weight-bolder'
|
||||||
: ''
|
: ''
|
||||||
"
|
"
|
||||||
v-show="!(tag === '搜索结果' && commandSearchKeyword?.length < 2)"
|
v-show="!(tag === '搜索结果' && commandSearchKeyword?.length < 2)"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user