导出功能调整

This commit is contained in:
fofolee
2022-04-03 22:15:09 +08:00
parent fcc83a0955
commit 8ae8f52212
2 changed files with 38 additions and 4 deletions

View File

@@ -508,7 +508,13 @@ export default {
},
],
};
let stringifyCommands = JSON.stringify(this.allQuickCommands);
let commandsToExport = JSON.parse(JSON.stringify(this.allQuickCommands));
// 不导出默认命令
if (!utools.isDev())
Object.keys(commandsToExport).forEach((code) => {
if (code.includes("default_")) delete commandsToExport[code];
});
let stringifyCommands = JSON.stringify(commandsToExport);
if (saveAsFile) {
window.saveFile(stringifyCommands, options);
quickcommand.showMessageBox("导出成功!");