Bläddra i källkod

fix: 问题处理

From-wh 2 år sedan
förälder
incheckning
3940ef3e39

+ 1 - 0
template/admin/src/pages/system/backendRouting/index.vue

@@ -589,6 +589,7 @@ export default {
           syncRoute(this.app_name).then((res) => {
             this.getInterfaceList('one');
             this.$Message.success(res.msg);
+            this.$Modal.remove();
           });
         },
       });

+ 13 - 0
template/admin/src/pages/system/codeGeneration/index.vue

@@ -143,6 +143,19 @@ export default {
         this.bus.$emit('routesListChange');
       });
     },
+    formatTwoStageRoutes(arr) {
+      if (arr.length <= 0) return false;
+      const newArr = [];
+      const cacheList = [];
+      arr.forEach((v) => {
+        if (v && v.meta && v.meta.keepAlive) {
+          newArr.push({ ...v });
+          cacheList.push(v.name);
+          this.$store.dispatch('keepAliveNames/setCacheKeepAlive', cacheList);
+        }
+      });
+      return newArr;
+    },
   },
 };
 </script>