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; + }, }, };