From 0e414ba3c10b4e47a85feb1a38cae66c815719d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=97=A0=E6=9C=A8?= Date: Sat, 26 Jun 2021 21:25:11 +0800 Subject: [PATCH] feat(demo): add route multi tabs show MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 添加同一路由演示多个不同参数的tab close: #817 --- src/locales/lang/en/routes/demo.ts | 2 +- src/locales/lang/zh_CN/routes/demo.ts | 1 + src/router/routes/modules/demo/system.ts | 13 +++- .../demo/system/account/AccountDetail.vue | 62 +++++++++++++++++++ src/views/demo/system/account/index.vue | 16 ++++- 5 files changed, 91 insertions(+), 3 deletions(-) create mode 100644 src/views/demo/system/account/AccountDetail.vue diff --git a/src/locales/lang/en/routes/demo.ts b/src/locales/lang/en/routes/demo.ts index c90e8577..c57124ca 100644 --- a/src/locales/lang/en/routes/demo.ts +++ b/src/locales/lang/en/routes/demo.ts @@ -163,7 +163,7 @@ export default { moduleName: 'System management', account: 'Account management', - + account_detail: 'Account detail', password: 'Change password', dept: 'Department management', diff --git a/src/locales/lang/zh_CN/routes/demo.ts b/src/locales/lang/zh_CN/routes/demo.ts index 65fea4cf..3908052e 100644 --- a/src/locales/lang/zh_CN/routes/demo.ts +++ b/src/locales/lang/zh_CN/routes/demo.ts @@ -157,6 +157,7 @@ export default { system: { moduleName: '系统管理', account: '账号管理', + account_detail: '账号详情', password: '修改密码', dept: '部门管理', menu: '菜单管理', diff --git a/src/router/routes/modules/demo/system.ts b/src/router/routes/modules/demo/system.ts index 96cc8ba9..479353d6 100644 --- a/src/router/routes/modules/demo/system.ts +++ b/src/router/routes/modules/demo/system.ts @@ -18,10 +18,21 @@ const system: AppRouteModule = { name: 'AccountManagement', meta: { title: t('routes.demo.system.account'), - ignoreKeepAlive: true, + ignoreKeepAlive: false, }, component: () => import('/@/views/demo/system/account/index.vue'), }, + { + path: 'account_detail/:id', + name: 'AccountDetail', + meta: { + title: t('routes.demo.system.account_detail'), + ignoreKeepAlive: true, + showMenu: false, + currentActiveMenu: '/system/account', + }, + component: () => import('/@/views/demo/system/account/AccountDetail.vue'), + }, { path: 'role', name: 'RoleManagement', diff --git a/src/views/demo/system/account/AccountDetail.vue b/src/views/demo/system/account/AccountDetail.vue new file mode 100644 index 00000000..914dabba --- /dev/null +++ b/src/views/demo/system/account/AccountDetail.vue @@ -0,0 +1,62 @@ + + + + + diff --git a/src/views/demo/system/account/index.vue b/src/views/demo/system/account/index.vue index 158ebd55..7a800ff1 100644 --- a/src/views/demo/system/account/index.vue +++ b/src/views/demo/system/account/index.vue @@ -8,13 +8,20 @@