From 9e208411a24d4ccc9306555cc45aa7135d0df78f Mon Sep 17 00:00:00 2001 From: zuihou <244387066@qq.com> Date: Tue, 27 Apr 2021 00:22:05 +0800 Subject: [PATCH] feat(demo): add permission table demo --- src/locales/lang/en/routes/demo/table.ts | 1 + src/locales/lang/zh_CN/routes/demo/table.ts | 1 + src/router/menus/modules/demo/comp.ts | 4 + src/router/routes/modules/demo/comp.ts | 8 ++ src/views/demo/table/AuthColumn.vue | 127 ++++++++++++++++++++ 5 files changed, 141 insertions(+) create mode 100644 src/views/demo/table/AuthColumn.vue diff --git a/src/locales/lang/en/routes/demo/table.ts b/src/locales/lang/en/routes/demo/table.ts index 5f50b03dad9..c5a2dcc6ca8 100644 --- a/src/locales/lang/en/routes/demo/table.ts +++ b/src/locales/lang/en/routes/demo/table.ts @@ -16,4 +16,5 @@ export default { footerTable: 'Footer', editCellTable: 'Editable cell', editRowTable: 'Editable row', + authColumn: 'Auth column', }; diff --git a/src/locales/lang/zh_CN/routes/demo/table.ts b/src/locales/lang/zh_CN/routes/demo/table.ts index 498f285d9a4..254b10ed976 100644 --- a/src/locales/lang/zh_CN/routes/demo/table.ts +++ b/src/locales/lang/zh_CN/routes/demo/table.ts @@ -16,4 +16,5 @@ export default { footerTable: '表尾行合计', editCellTable: '可编辑单元格', editRowTable: '可编辑行', + authColumn: '权限列', }; diff --git a/src/router/menus/modules/demo/comp.ts b/src/router/menus/modules/demo/comp.ts index 71bb106cb89..611135a684d 100644 --- a/src/router/menus/modules/demo/comp.ts +++ b/src/router/menus/modules/demo/comp.ts @@ -118,6 +118,10 @@ const menu: MenuModule = { path: 'editRowTable', name: t('routes.demo.table.editRowTable'), }, + { + path: 'authColumn', + name: t('routes.demo.table.authColumn'), + }, ], }, { diff --git a/src/router/routes/modules/demo/comp.ts b/src/router/routes/modules/demo/comp.ts index 6d6756e1a40..88e9608a033 100644 --- a/src/router/routes/modules/demo/comp.ts +++ b/src/router/routes/modules/demo/comp.ts @@ -230,6 +230,14 @@ const comp: AppRouteModule = { title: t('routes.demo.table.editRowTable'), }, }, + { + path: 'authColumn', + name: 'AuthColumnDemo', + component: () => import('/@/views/demo/table/AuthColumn.vue'), + meta: { + title: t('routes.demo.table.authColumn'), + }, + }, ], }, { diff --git a/src/views/demo/table/AuthColumn.vue b/src/views/demo/table/AuthColumn.vue new file mode 100644 index 00000000000..a6113246ca0 --- /dev/null +++ b/src/views/demo/table/AuthColumn.vue @@ -0,0 +1,127 @@ + +