diff --git a/src/router/index.js b/src/router/index.js index e5b3de83..d7674a2c 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -51,10 +51,11 @@ const ExcelDownload = () => import('../views/excel/index'); const Theme = () => import('../views/theme/index'); /* example*/ -const DynamicTable = () => import('../views/example/dynamictable'); -const Table = () => import('../views/example/table'); -const DragTable = () => import('../views/example/dragTable'); -const InlineEditTable = () => import('../views/example/inlineEditTable'); +const TableLayout = () => import('../views/example/table/index'); +const DynamicTable = () => import('../views/example/table/dynamictable'); +const Table = () => import('../views/example/table/table'); +const DragTable = () => import('../views/example/table/dragTable'); +const InlineEditTable = () => import('../views/example/table/inlineEditTable'); const Form1 = () => import('../views/example/form1'); /* permission */ @@ -192,10 +193,17 @@ export const asyncRouterMap = [ name: '综合实例', icon: 'zonghe', children: [ - { path: 'dynamictable', component: DynamicTable, name: '动态table' }, - { path: 'dragtable', component: DragTable, name: '拖拽table' }, - { path: 'inline_edit_table', component: InlineEditTable, name: 'table内编辑' }, - { path: 'table', component: Table, name: '综合table' }, + { + path: '/table', + component: TableLayout, + name: 'table', + children: [ + { path: 'dynamictable', component: DynamicTable, name: '动态table' }, + { path: 'dragtable', component: DragTable, name: '拖拽table' }, + { path: 'inline_edit_table', component: InlineEditTable, name: 'table内编辑' }, + { path: 'table', component: Table, name: '综合table' } + ] + }, { path: 'form1', component: Form1, name: '综合form1' } ] }, diff --git a/src/views/example/dragTable.vue b/src/views/example/table/dragTable.vue similarity index 100% rename from src/views/example/dragTable.vue rename to src/views/example/table/dragTable.vue diff --git a/src/views/example/dynamictable.vue b/src/views/example/table/dynamictable.vue similarity index 100% rename from src/views/example/dynamictable.vue rename to src/views/example/table/dynamictable.vue diff --git a/src/views/example/table/index.vue b/src/views/example/table/index.vue new file mode 100644 index 00000000..a44ab87b --- /dev/null +++ b/src/views/example/table/index.vue @@ -0,0 +1,3 @@ + + + diff --git a/src/views/example/inlineEditTable.vue b/src/views/example/table/inlineEditTable.vue similarity index 100% rename from src/views/example/inlineEditTable.vue rename to src/views/example/table/inlineEditTable.vue diff --git a/src/views/example/table.vue b/src/views/example/table/table.vue similarity index 100% rename from src/views/example/table.vue rename to src/views/example/table/table.vue diff --git a/src/views/layout/Sidebar.vue b/src/views/layout/Sidebar.vue index c4cab5c0..d06f72f9 100644 --- a/src/views/layout/Sidebar.vue +++ b/src/views/layout/Sidebar.vue @@ -1,30 +1,14 @@ - - - - - {{item.name}} - - - - {{child.name}} - - - - - - {{item.children[0].name}} - - - + + - diff --git a/src/views/layout/SidebarItem.vue b/src/views/layout/SidebarItem.vue new file mode 100644 index 00000000..2d9b85cf --- /dev/null +++ b/src/views/layout/SidebarItem.vue @@ -0,0 +1,46 @@ + + + + + + {{item.children[0].name}} + + + + + {{item.name}} + + + + + + {{child.name}} + + + + + + + + + + +