diff --git a/src/App.vue b/src/App.vue index 28f9bcc..d20e878 100644 --- a/src/App.vue +++ b/src/App.vue @@ -91,6 +91,7 @@ export default defineComponent({ _.cloneDeep(this.profile), this.utools.DBPRE.CFG + "preferences" ); + this.$refs.view.$refs?.commandEditor?.saveCodeHistory() this.$router.push("/"); }, runCronTask(featureCode, cronExp) { diff --git a/src/components/CommandEditor.vue b/src/components/CommandEditor.vue index 0ec9d59..c83eeed 100644 --- a/src/components/CommandEditor.vue +++ b/src/components/CommandEditor.vue @@ -283,9 +283,6 @@ export default { mounted() { this.init(); }, - beforeUnmount() { - this.saveCodeHistory(); - }, computed: { configurationPage() { return this.$root.$refs.view;