mirror of
https://github.com/fofolee/uTools-quickcommand.git
synced 2025-10-24 04:21:23 +08:00
仅 runcode 才保存历史
This commit is contained in:
12
src/App.vue
12
src/App.vue
@@ -86,21 +86,11 @@ export default defineComponent({
|
||||
this.$router.push(enter.code);
|
||||
},
|
||||
outPlugin() {
|
||||
this.saveProfile();
|
||||
this.$router.push("/");
|
||||
window.temporaryStoreSoldOut();
|
||||
},
|
||||
saveProfile() {
|
||||
let commandEditor = this.$refs.view.$refs.commandEditor;
|
||||
if (commandEditor && commandEditor.action.type !== "edit") {
|
||||
let command = _.cloneDeep(commandEditor.quickcommandInfo);
|
||||
command.cursorPosition = commandEditor.$refs.editor.getCursorPosition();
|
||||
this.profile.codeHistory[commandEditor.action.type] = command;
|
||||
}
|
||||
this.utools.putDB(
|
||||
_.cloneDeep(this.profile),
|
||||
this.utools.DBPRE.CFG + "preferences"
|
||||
);
|
||||
this.$router.push("/");
|
||||
},
|
||||
runCronTask(featureCode, cronExp) {
|
||||
this.cronJobs[featureCode] = Cron(cronExp, () => {
|
||||
|
||||
Reference in New Issue
Block a user