From 3940ef3e391575551f08cb0380b25f0bba038501 Mon Sep 17 00:00:00 2001 From: From-wh Date: Sun, 23 Apr 2023 17:43:47 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E9=97=AE=E9=A2=98=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../admin/src/pages/system/backendRouting/index.vue | 1 + .../admin/src/pages/system/codeGeneration/index.vue | 13 +++++++++++++ 2 files changed, 14 insertions(+) diff --git a/template/admin/src/pages/system/backendRouting/index.vue b/template/admin/src/pages/system/backendRouting/index.vue index 5921d074e..1bc485ada 100644 --- a/template/admin/src/pages/system/backendRouting/index.vue +++ b/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(); }); }, }); diff --git a/template/admin/src/pages/system/codeGeneration/index.vue b/template/admin/src/pages/system/codeGeneration/index.vue index a61ed5714..5d067e507 100644 --- a/template/admin/src/pages/system/codeGeneration/index.vue +++ b/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; + }, }, };