瀏覽代碼

add auto save

tripeur 4 年之前
父節點
當前提交
fdd0343a1d
共有 1 個文件被更改,包括 3 次插入0 次删除
  1. 3 0
      src/PlannerApp.vue

+ 3 - 0
src/PlannerApp.vue

@@ -102,6 +102,9 @@ export default defineComponent({
       this.localSave();
     };
   },
+  unmounted() {
+    this.save();
+  },
   methods: {
     localSave() {
       window.localStorage.setItem("activeState", JSON.stringify(this.$store.getters.getJSONState));