improve: 生成页面页面切换刷新

This commit is contained in:
From-wh 2023-04-23 10:27:16 +08:00
parent 5bc849d9c0
commit e6d689b9b9
2 changed files with 6 additions and 2 deletions

View File

@ -65,6 +65,10 @@ export default {
return this.isMobile ? 'top' : 'left';
},
},
beforeRouteUpdate(to, from, next) {
this.getCrudApi(to.params.table_name);
next();
},
created() {
this.getCrudApi(this.$route.params.table_name);
},

View File

@ -22,7 +22,7 @@ export default {
name: `${pre}crud`,
},
meta: {
auth: ['admin-crud'],
auth: true,
},
component: LayoutMain,
children: [
@ -30,7 +30,7 @@ export default {
path: ':table_name',
name: `${pre}crud`,
meta: {
auth: ['admin-crund-index'],
auth: true,
title: '增删改查',
},
component: () => import('@/pages/crud/index'),