wip: 重构中
This commit is contained in:
@@ -1,444 +0,0 @@
|
||||
export const checkedNodes = [{
|
||||
'path': '/components-demo',
|
||||
'title': '功能组件',
|
||||
'name': 'ComponentsDemo',
|
||||
'children': [{
|
||||
'path': '/components-demo/echarts',
|
||||
'title': '图表',
|
||||
'name': 'EchartsDemo'
|
||||
}, {
|
||||
'path': '/components-demo/preview',
|
||||
'title': '图片预览',
|
||||
'name': 'PreviewDemo'
|
||||
}, {
|
||||
'path': '/components-demo/button',
|
||||
'title': '按钮',
|
||||
'name': 'ButtonDemo'
|
||||
}, {
|
||||
'path': '/components-demo/message',
|
||||
'title': '消息提示',
|
||||
'name': 'MessageDemo'
|
||||
}, {
|
||||
'path': '/components-demo/count-to',
|
||||
'title': '数字动画',
|
||||
'name': 'CountToDemo'
|
||||
}, {
|
||||
'path': '/components-demo/search',
|
||||
'title': '查询',
|
||||
'name': 'SearchDemo'
|
||||
}, {
|
||||
'path': '/components-demo/editor',
|
||||
'title': '富文本编辑器',
|
||||
'name': 'EditorDemo'
|
||||
}, {
|
||||
'path': '/components-demo/markdown',
|
||||
'title': 'markdown编辑器',
|
||||
'name': 'MarkdownDemo'
|
||||
}, {
|
||||
'path': '/components-demo/dialog',
|
||||
'title': '弹窗',
|
||||
'name': 'DialogDemo'
|
||||
}, {
|
||||
'path': '/components-demo/more',
|
||||
'title': '显示更多',
|
||||
'name': 'MoreDemo'
|
||||
}, {
|
||||
'path': '/components-demo/detail',
|
||||
'title': '详情组件',
|
||||
'name': 'DetailDemo'
|
||||
}, {
|
||||
'path': '/components-demo/qrcode',
|
||||
'title': '二维码组件',
|
||||
'name': 'QrcodeDemo'
|
||||
}, {
|
||||
'path': '/components-demo/avatars',
|
||||
'title': '头像组',
|
||||
'name': 'AvatarsDemo'
|
||||
}, {
|
||||
'path': '/components-demo/highlight',
|
||||
'title': '文字高亮',
|
||||
'name': 'HighlightDemo'
|
||||
}]
|
||||
}, {
|
||||
'path': '/components-demo/echarts',
|
||||
'title': '图表',
|
||||
'name': 'EchartsDemo'
|
||||
}, {
|
||||
'path': '/components-demo/preview',
|
||||
'title': '图片预览',
|
||||
'name': 'PreviewDemo'
|
||||
}, {
|
||||
'path': '/components-demo/button',
|
||||
'title': '按钮',
|
||||
'name': 'ButtonDemo'
|
||||
}, {
|
||||
'path': '/components-demo/message',
|
||||
'title': '消息提示',
|
||||
'name': 'MessageDemo'
|
||||
}, {
|
||||
'path': '/components-demo/count-to',
|
||||
'title': '数字动画',
|
||||
'name': 'CountToDemo'
|
||||
}, {
|
||||
'path': '/components-demo/search',
|
||||
'title': '查询',
|
||||
'name': 'SearchDemo'
|
||||
}, {
|
||||
'path': '/components-demo/editor',
|
||||
'title': '富文本编辑器',
|
||||
'name': 'EditorDemo'
|
||||
}, {
|
||||
'path': '/components-demo/markdown',
|
||||
'title': 'markdown编辑器',
|
||||
'name': 'MarkdownDemo'
|
||||
}, {
|
||||
'path': '/components-demo/dialog',
|
||||
'title': '弹窗',
|
||||
'name': 'DialogDemo'
|
||||
}, {
|
||||
'path': '/components-demo/more',
|
||||
'title': '显示更多',
|
||||
'name': 'MoreDemo'
|
||||
}, {
|
||||
'path': '/components-demo/detail',
|
||||
'title': '详情组件',
|
||||
'name': 'DetailDemo'
|
||||
}, {
|
||||
'path': '/components-demo/qrcode',
|
||||
'title': '二维码组件',
|
||||
'name': 'QrcodeDemo'
|
||||
}, {
|
||||
'path': '/components-demo/avatars',
|
||||
'title': '头像组',
|
||||
'name': 'AvatarsDemo'
|
||||
}, {
|
||||
'path': '/components-demo/highlight',
|
||||
'title': '文字高亮',
|
||||
'name': 'HighlightDemo'
|
||||
}, {
|
||||
'path': '/table-demo',
|
||||
'title': '表格',
|
||||
'name': 'TableDemo',
|
||||
'children': [{
|
||||
'path': '/table-demo/basic-table',
|
||||
'title': '基础表格',
|
||||
'name': 'BasicTable'
|
||||
}, {
|
||||
'path': '/table-demo/page-table',
|
||||
'title': '分页表格',
|
||||
'name': 'PageTable'
|
||||
}, {
|
||||
'path': '/table-demo/stripe-table',
|
||||
'title': '带斑马纹表格',
|
||||
'name': 'StripeTable'
|
||||
}, {
|
||||
'path': '/table-demo/border-table',
|
||||
'title': '带边框表格',
|
||||
'name': 'BorderTable'
|
||||
}, {
|
||||
'path': '/table-demo/state-table',
|
||||
'title': '带状态表格',
|
||||
'name': 'StateTable'
|
||||
}, {
|
||||
'path': '/table-demo/fixed-header',
|
||||
'title': '固定表头',
|
||||
'name': 'FixedHeader'
|
||||
}, {
|
||||
'path': '/table-demo/fixed-column',
|
||||
'title': '固定列',
|
||||
'name': 'FixedColumn'
|
||||
}, {
|
||||
'path': '/table-demo/fixed-column-header',
|
||||
'title': '固定列和表头',
|
||||
'name': 'FixedColumnHeader'
|
||||
}, {
|
||||
'path': '/table-demo/fluid-height',
|
||||
'title': '流体高度',
|
||||
'name': 'FluidHeight'
|
||||
}, {
|
||||
'path': '/table-demo/multi-header',
|
||||
'title': '多级表头',
|
||||
'name': 'MultiHeader'
|
||||
}, {
|
||||
'path': '/table-demo/single-choice',
|
||||
'title': '单选',
|
||||
'name': 'SingleChoice'
|
||||
}, {
|
||||
'path': '/table-demo/multiple-choice',
|
||||
'title': '多选',
|
||||
'name': 'MultipleChoice'
|
||||
}, {
|
||||
'path': '/table-demo/sort-table',
|
||||
'title': '排序',
|
||||
'name': 'SortTable'
|
||||
}, {
|
||||
'path': '/table-demo/screen-table',
|
||||
'title': '筛选',
|
||||
'name': 'ScreenTable'
|
||||
}, {
|
||||
'path': '/table-demo/expand-row',
|
||||
'title': '展开行',
|
||||
'name': 'ExpandRow'
|
||||
}, {
|
||||
'path': '/table-demo/tree-and-load',
|
||||
'title': '树形数据与懒加载',
|
||||
'name': 'TreeAndLoad'
|
||||
}, {
|
||||
'path': '/table-demo/custom-header',
|
||||
'title': '自定义表头',
|
||||
'name': 'CustomHeader'
|
||||
}, {
|
||||
'path': '/table-demo/total-table',
|
||||
'title': '表尾合计行',
|
||||
'name': 'TotalTable'
|
||||
}, {
|
||||
'path': '/table-demo/merge-table',
|
||||
'title': '合并行或列',
|
||||
'name': 'MergeTable'
|
||||
}, {
|
||||
'path': '/table-demo/custom-index',
|
||||
'title': '自定义索引',
|
||||
'name': 'CustomIndex'
|
||||
}]
|
||||
}, {
|
||||
'path': '/table-demo/basic-table',
|
||||
'title': '基础表格',
|
||||
'name': 'BasicTable'
|
||||
}, {
|
||||
'path': '/table-demo/page-table',
|
||||
'title': '分页表格',
|
||||
'name': 'PageTable'
|
||||
}, {
|
||||
'path': '/table-demo/stripe-table',
|
||||
'title': '带斑马纹表格',
|
||||
'name': 'StripeTable'
|
||||
}, {
|
||||
'path': '/table-demo/border-table',
|
||||
'title': '带边框表格',
|
||||
'name': 'BorderTable'
|
||||
}, {
|
||||
'path': '/table-demo/state-table',
|
||||
'title': '带状态表格',
|
||||
'name': 'StateTable'
|
||||
}, {
|
||||
'path': '/table-demo/fixed-header',
|
||||
'title': '固定表头',
|
||||
'name': 'FixedHeader'
|
||||
}, {
|
||||
'path': '/table-demo/fixed-column',
|
||||
'title': '固定列',
|
||||
'name': 'FixedColumn'
|
||||
}, {
|
||||
'path': '/table-demo/fixed-column-header',
|
||||
'title': '固定列和表头',
|
||||
'name': 'FixedColumnHeader'
|
||||
}, {
|
||||
'path': '/table-demo/fluid-height',
|
||||
'title': '流体高度',
|
||||
'name': 'FluidHeight'
|
||||
}, {
|
||||
'path': '/table-demo/multi-header',
|
||||
'title': '多级表头',
|
||||
'name': 'MultiHeader'
|
||||
}, {
|
||||
'path': '/table-demo/single-choice',
|
||||
'title': '单选',
|
||||
'name': 'SingleChoice'
|
||||
}, {
|
||||
'path': '/table-demo/multiple-choice',
|
||||
'title': '多选',
|
||||
'name': 'MultipleChoice'
|
||||
}, {
|
||||
'path': '/table-demo/sort-table',
|
||||
'title': '排序',
|
||||
'name': 'SortTable'
|
||||
}, {
|
||||
'path': '/table-demo/screen-table',
|
||||
'title': '筛选',
|
||||
'name': 'ScreenTable'
|
||||
}, {
|
||||
'path': '/table-demo/expand-row',
|
||||
'title': '展开行',
|
||||
'name': 'ExpandRow'
|
||||
}, {
|
||||
'path': '/table-demo/tree-and-load',
|
||||
'title': '树形数据与懒加载',
|
||||
'name': 'TreeAndLoad'
|
||||
}, {
|
||||
'path': '/table-demo/custom-header',
|
||||
'title': '自定义表头',
|
||||
'name': 'CustomHeader'
|
||||
}, {
|
||||
'path': '/table-demo/total-table',
|
||||
'title': '表尾合计行',
|
||||
'name': 'TotalTable'
|
||||
}, {
|
||||
'path': '/table-demo/merge-table',
|
||||
'title': '合并行或列',
|
||||
'name': 'MergeTable'
|
||||
}, {
|
||||
'path': '/table-demo/custom-index',
|
||||
'title': '自定义索引',
|
||||
'name': 'CustomIndex'
|
||||
}, {
|
||||
'path': '/directives-demo',
|
||||
'title': '自定义指令',
|
||||
'name': 'DirectivesDemo',
|
||||
'children': [{
|
||||
'path': '/directives-demo/clipboard',
|
||||
'title': 'Clipboard',
|
||||
'name': 'ClipboardDemo'
|
||||
}]
|
||||
}, {
|
||||
'path': '/directives-demo/clipboard',
|
||||
'title': 'Clipboard',
|
||||
'name': 'ClipboardDemo'
|
||||
}, {
|
||||
'path': '/hooks-demo',
|
||||
'title': 'Hooks',
|
||||
'name': 'HooksDemo',
|
||||
'children': [{
|
||||
'path': '/hooks-demo/watermark',
|
||||
'title': 'UseWaterMark',
|
||||
'name': 'UseWatermarkDemo'
|
||||
}, {
|
||||
'path': '/hooks-demo/useScrollTo',
|
||||
'title': 'UseScrollTo',
|
||||
'name': 'UseScrollToDemo'
|
||||
}]
|
||||
}, {
|
||||
'path': '/hooks-demo/watermark',
|
||||
'title': 'UseWaterMark',
|
||||
'name': 'UseWatermarkDemo'
|
||||
}, {
|
||||
'path': '/hooks-demo/useScrollTo',
|
||||
'title': 'UseScrollTo',
|
||||
'name': 'UseScrollToDemo'
|
||||
}, {
|
||||
'path': '/icon/index',
|
||||
'title': '图标',
|
||||
'name': 'Icons'
|
||||
}, {
|
||||
'path': '/level',
|
||||
'title': '多级菜单缓存',
|
||||
'name': 'Level',
|
||||
'children': [{
|
||||
'path': '/level/menu1',
|
||||
'title': 'Menu1',
|
||||
'name': 'Menu1Demo',
|
||||
'children': [{
|
||||
'path': '/level/menu1/menu1-1',
|
||||
'title': 'Menu1-1',
|
||||
'name': 'Menu11Demo',
|
||||
'children': [{
|
||||
'path': '/level/menu1/menu1-1/menu1-1-1',
|
||||
'title': 'Menu1-1-1',
|
||||
'name': 'Menu111Demo'
|
||||
}]
|
||||
}, {
|
||||
'path': '/level/menu1/menu1-2',
|
||||
'title': 'Menu1-2',
|
||||
'name': 'Menu12Demo'
|
||||
}]
|
||||
}, {
|
||||
'path': '/level/menu2',
|
||||
'title': 'Menu2',
|
||||
'name': 'Menu2Demo'
|
||||
}]
|
||||
}, {
|
||||
'path': '/level/menu1',
|
||||
'title': 'Menu1',
|
||||
'name': 'Menu1Demo',
|
||||
'children': [{
|
||||
'path': '/level/menu1/menu1-1',
|
||||
'title': 'Menu1-1',
|
||||
'name': 'Menu11Demo',
|
||||
'children': [{
|
||||
'path': '/level/menu1/menu1-1/menu1-1-1',
|
||||
'title': 'Menu1-1-1',
|
||||
'name': 'Menu111Demo'
|
||||
}]
|
||||
}, {
|
||||
'path': '/level/menu1/menu1-2',
|
||||
'title': 'Menu1-2',
|
||||
'name': 'Menu12Demo'
|
||||
}]
|
||||
}, {
|
||||
'path': '/level/menu1/menu1-1',
|
||||
'title': 'Menu1-1',
|
||||
'name': 'Menu11Demo',
|
||||
'children': [{
|
||||
'path': '/level/menu1/menu1-1/menu1-1-1',
|
||||
'title': 'Menu1-1-1',
|
||||
'name': 'Menu111Demo'
|
||||
}]
|
||||
}, {
|
||||
'path': '/level/menu1/menu1-1/menu1-1-1',
|
||||
'title': 'Menu1-1-1',
|
||||
'name': 'Menu111Demo'
|
||||
}, {
|
||||
'path': '/level/menu1/menu1-2',
|
||||
'title': 'Menu1-2',
|
||||
'name': 'Menu12Demo'
|
||||
}, {
|
||||
'path': '/level/menu2',
|
||||
'title': 'Menu2',
|
||||
'name': 'Menu2Demo'
|
||||
}, {
|
||||
'path': '/example-demo',
|
||||
'title': '综合实例',
|
||||
'name': 'ExampleDemo',
|
||||
'children': [{
|
||||
'path': '/example-demo/example-dialog',
|
||||
'title': '列表综合实例-弹窗',
|
||||
'name': 'ExampleDialog'
|
||||
}, {
|
||||
'path': '/example-demo/example-page',
|
||||
'title': '列表综合实例-页面',
|
||||
'name': 'ExamplePage'
|
||||
}]
|
||||
}, {
|
||||
'path': '/example-demo/example-dialog',
|
||||
'title': '列表综合实例-弹窗',
|
||||
'name': 'ExampleDialog'
|
||||
}, {
|
||||
'path': '/example-demo/example-page',
|
||||
'title': '列表综合实例-页面',
|
||||
'name': 'ExamplePage'
|
||||
}, {
|
||||
'path': '/role-demo',
|
||||
'title': '权限管理',
|
||||
'name': 'RoleDemo',
|
||||
'children': [{
|
||||
'path': '/role-demo/user',
|
||||
'title': '用户管理',
|
||||
'name': 'User'
|
||||
}, {
|
||||
'path': '/role-demo/role',
|
||||
'title': '角色管理',
|
||||
'name': 'Role'
|
||||
}]
|
||||
}, {
|
||||
'path': '/role-demo/user',
|
||||
'title': '用户管理',
|
||||
'name': 'User'
|
||||
}, {
|
||||
'path': '/role-demo/role',
|
||||
'title': '角色管理',
|
||||
'name': 'Role'
|
||||
}]
|
||||
|
||||
export const checkedkeys = ['/components-demo', '/components-demo/echarts', '/components-demo/preview',
|
||||
'/components-demo/button', '/components-demo/message', '/components-demo/count-to', '/components-demo/search',
|
||||
'/components-demo/editor', '/components-demo/markdown', '/components-demo/dialog', '/components-demo/more',
|
||||
'/components-demo/detail', '/components-demo/qrcode', '/components-demo/avatars', '/table-demo', '/table-demo/basic-table', '/table-demo/page-table',
|
||||
'/table-demo/stripe-table', '/table-demo/border-table', '/table-demo/state-table', '/table-demo/fixed-header',
|
||||
'/table-demo/fixed-column', '/table-demo/fixed-column-header', '/table-demo/fluid-height',
|
||||
'/table-demo/multi-header', '/table-demo/single-choice', '/table-demo/multiple-choice', '/table-demo/sort-table',
|
||||
'/table-demo/screen-table', '/table-demo/expand-row', '/table-demo/tree-and-load', '/table-demo/custom-header',
|
||||
'/table-demo/total-table', '/table-demo/merge-table', '/table-demo/custom-index', '/directives-demo',
|
||||
'/directives-demo/clipboard', '/hooks-demo', '/hooks-demo/watermark', '/hooks-demo/useScrollTo', '/icon/index',
|
||||
'/level', '/level/menu1', '/level/menu1/menu1-1', '/level/menu1/menu1-1/menu1-1-1', '/level/menu1/menu1-2',
|
||||
'/level/menu2', '/example-demo', '/example-demo/example-dialog', '/example-demo/example-page', '/role-demo',
|
||||
'/role-demo/user', '/role-demo/role'
|
||||
]
|
||||
@@ -1,97 +0,0 @@
|
||||
import wsCache from '@/cache'
|
||||
import { Role } from './types'
|
||||
import { checkedNodes, checkedkeys } from './admin-role'
|
||||
import { checkedRoleNodes } from './test-role'
|
||||
|
||||
let List: Role[] = wsCache.get('roleList') || [
|
||||
{
|
||||
roleName: 'admin',
|
||||
id: '1',
|
||||
checkedNodes: checkedNodes,
|
||||
checkedkeys: checkedkeys
|
||||
},
|
||||
{
|
||||
roleName: 'test',
|
||||
id: '2',
|
||||
checkedNodes: checkedRoleNodes,
|
||||
checkedkeys: []
|
||||
}
|
||||
]
|
||||
|
||||
export default [
|
||||
// 列表接口
|
||||
{
|
||||
url: 'http://mockjs.test.cn/role/list',
|
||||
type: 'get',
|
||||
response: (config: any) => {
|
||||
const {
|
||||
roleName,
|
||||
pageIndex,
|
||||
pageSize
|
||||
} = config.query
|
||||
|
||||
const mockList = List.filter(item => {
|
||||
if (roleName && item.roleName.indexOf(roleName) < 0) return false
|
||||
return true
|
||||
})
|
||||
const pageList = mockList.filter((item, index) => index < pageSize * pageIndex && index >= pageSize * (pageIndex - 1))
|
||||
|
||||
return {
|
||||
code: '0000',
|
||||
data: {
|
||||
total: mockList.length,
|
||||
list: pageList
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
// 详情接口
|
||||
{
|
||||
url: 'http://mockjs.test.cn/role/detail',
|
||||
type: 'get',
|
||||
response: (config: any) => {
|
||||
const {
|
||||
id
|
||||
} = config.query
|
||||
for (const role of List) {
|
||||
if (role.id === id) {
|
||||
return {
|
||||
code: '0000',
|
||||
data: role
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
// 保存接口
|
||||
{
|
||||
url: 'http://mockjs.test.cn/role/save',
|
||||
type: 'post',
|
||||
response: (config: any) => {
|
||||
const data = config.body
|
||||
if (!data.id) {
|
||||
List = [data].concat(List)
|
||||
return {
|
||||
code: '0000',
|
||||
data: 'success'
|
||||
}
|
||||
} else {
|
||||
List.map(item => {
|
||||
if (item.id === data.id) {
|
||||
for (const key in item) {
|
||||
item[key] = data[key]
|
||||
}
|
||||
}
|
||||
})
|
||||
// 存在缓存中,避免刷新没有掉
|
||||
wsCache.set('roleList', List)
|
||||
return {
|
||||
code: '0000',
|
||||
data: 'success'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -1,526 +0,0 @@
|
||||
export const checkedRoleNodes = [
|
||||
{
|
||||
path: '/components-demo',
|
||||
component: '#',
|
||||
redirect: '/components-demo/echarts',
|
||||
name: 'ComponentsDemo',
|
||||
meta: {
|
||||
title: '功能组件',
|
||||
icon: 'component',
|
||||
alwaysShow: true
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: 'echarts',
|
||||
component: 'pages/index/views/components-demo/echarts/index',
|
||||
name: 'EchartsDemo',
|
||||
meta: {
|
||||
title: '图表'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'preview',
|
||||
component: 'pages/index/views/components-demo/preview/index',
|
||||
name: 'PreviewDemo',
|
||||
meta: {
|
||||
title: '图片预览'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'button',
|
||||
component: 'pages/index/views/components-demo/button/index',
|
||||
name: 'ButtonDemo',
|
||||
meta: {
|
||||
title: '按钮'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'message',
|
||||
component: 'pages/index/views/components-demo/message/index',
|
||||
name: 'MessageDemo',
|
||||
meta: {
|
||||
title: '消息提示'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'count-to',
|
||||
component: 'pages/index/views/components-demo/count-to/index',
|
||||
name: 'CountToDemo',
|
||||
meta: {
|
||||
title: '数字动画'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'search',
|
||||
component: 'pages/index/views/components-demo/search/index',
|
||||
name: 'SearchDemo',
|
||||
meta: {
|
||||
title: '查询'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'editor',
|
||||
component: 'pages/index/views/components-demo/editor/index',
|
||||
name: 'EditorDemo',
|
||||
meta: {
|
||||
title: '富文本编辑器'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'markdown',
|
||||
component: 'pages/index/views/components-demo/markdown/index',
|
||||
name: 'MarkdownDemo',
|
||||
meta: {
|
||||
title: 'markdown编辑器'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'dialog',
|
||||
component: 'pages/index/views/components-demo/dialog/index',
|
||||
name: 'DialogDemo',
|
||||
meta: {
|
||||
title: '弹窗'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'more',
|
||||
component: 'pages/index/views/components-demo/more/index',
|
||||
name: 'MoreDemo',
|
||||
meta: {
|
||||
title: '显示更多'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'detail',
|
||||
component: 'pages/index/views/components-demo/detail/index',
|
||||
name: 'DetailDemo',
|
||||
meta: {
|
||||
title: '详情组件'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'qrcode',
|
||||
component: 'pages/index/views/components-demo/qrcode/index',
|
||||
name: 'QrcodeDemo',
|
||||
meta: {
|
||||
title: '二维码组件'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'avatars',
|
||||
component: 'pages/index/views/components-demo/avatars/index',
|
||||
name: 'AvatarsDemo',
|
||||
meta: {
|
||||
title: '头像组'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'highlight',
|
||||
component: 'pages/index/views/components-demo/highlight/index',
|
||||
name: 'HighlightDemo',
|
||||
meta: {
|
||||
title: '文字高亮'
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/table-demo',
|
||||
component: '#',
|
||||
redirect: '/table-demo/basic-usage',
|
||||
name: 'TableDemo',
|
||||
meta: {
|
||||
title: '表格',
|
||||
icon: 'table',
|
||||
alwaysShow: true
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: 'basic-table',
|
||||
component: 'pages/index/views/table-demo/basic-table/index',
|
||||
name: 'BasicTable',
|
||||
meta: {
|
||||
title: '基础表格'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'page-table',
|
||||
component: 'pages/index/views/table-demo/page-table/index',
|
||||
name: 'PageTable',
|
||||
meta: {
|
||||
title: '分页表格'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'stripe-table',
|
||||
component: 'pages/index/views/table-demo/stripe-table/index',
|
||||
name: 'StripeTable',
|
||||
meta: {
|
||||
title: '带斑马纹表格'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'border-table',
|
||||
component: 'pages/index/views/table-demo/border-table/index',
|
||||
name: 'BorderTable',
|
||||
meta: {
|
||||
title: '带边框表格'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'state-table',
|
||||
component: 'pages/index/views/table-demo/state-table/index',
|
||||
name: 'StateTable',
|
||||
meta: {
|
||||
title: '带状态表格'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'fixed-header',
|
||||
component: 'pages/index/views/table-demo/fixed-header/index',
|
||||
name: 'FixedHeader',
|
||||
meta: {
|
||||
title: '固定表头'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'fixed-column',
|
||||
component: 'pages/index/views/table-demo/fixed-column/index',
|
||||
name: 'FixedColumn',
|
||||
meta: {
|
||||
title: '固定列'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'fixed-column-header',
|
||||
component: 'pages/index/views/table-demo/fixed-column-header/index',
|
||||
name: 'FixedColumnHeader',
|
||||
meta: {
|
||||
title: '固定列和表头'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'fluid-height',
|
||||
component: 'pages/index/views/table-demo/fluid-height/index',
|
||||
name: 'FluidHeight',
|
||||
meta: {
|
||||
title: '流体高度'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'multi-header',
|
||||
component: 'pages/index/views/table-demo/multi-header/index',
|
||||
name: 'MultiHeader',
|
||||
meta: {
|
||||
title: '多级表头'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'single-choice',
|
||||
component: 'pages/index/views/table-demo/single-choice/index',
|
||||
name: 'SingleChoice',
|
||||
meta: {
|
||||
title: '单选'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'multiple-choice',
|
||||
component: 'pages/index/views/table-demo/multiple-choice/index',
|
||||
name: 'MultipleChoice',
|
||||
meta: {
|
||||
title: '多选'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'sort-table',
|
||||
component: 'pages/index/views/table-demo/sort-table/index',
|
||||
name: 'SortTable',
|
||||
meta: {
|
||||
title: '排序'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'screen-table',
|
||||
component: 'pages/index/views/table-demo/screen-table/index',
|
||||
name: 'ScreenTable',
|
||||
meta: {
|
||||
title: '筛选'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'expand-row',
|
||||
component: 'pages/index/views/table-demo/expand-row/index',
|
||||
name: 'ExpandRow',
|
||||
meta: {
|
||||
title: '展开行'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'tree-and-load',
|
||||
component: 'pages/index/views/table-demo/tree-and-load/index',
|
||||
name: 'TreeAndLoad',
|
||||
meta: {
|
||||
title: '树形数据与懒加载'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'custom-header',
|
||||
component: 'pages/index/views/table-demo/custom-header/index',
|
||||
name: 'CustomHeader',
|
||||
meta: {
|
||||
title: '自定义表头'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'total-table',
|
||||
component: 'pages/index/views/table-demo/total-table/index',
|
||||
name: 'TotalTable',
|
||||
meta: {
|
||||
title: '表尾合计行'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'merge-table',
|
||||
component: 'pages/index/views/table-demo/merge-table/index',
|
||||
name: 'MergeTable',
|
||||
meta: {
|
||||
title: '合并行或列'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'custom-index',
|
||||
component: 'pages/index/views/table-demo/custom-index/index',
|
||||
name: 'CustomIndex',
|
||||
meta: {
|
||||
title: '自定义索引'
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/directives-demo',
|
||||
component: '#',
|
||||
redirect: '/directives-demo/clipboard',
|
||||
name: 'DirectivesDemo',
|
||||
meta: {
|
||||
title: '自定义指令',
|
||||
icon: 'clipboard',
|
||||
alwaysShow: true
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: 'clipboard',
|
||||
component: 'pages/index/views/directives-demo/clipboard/index',
|
||||
name: 'ClipboardDemo',
|
||||
meta: {
|
||||
title: 'Clipboard'
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/hooks-demo',
|
||||
component: '#',
|
||||
redirect: '/hooks-demo/watermark',
|
||||
name: 'HooksDemo',
|
||||
meta: {
|
||||
title: 'Hooks',
|
||||
icon: 'international',
|
||||
alwaysShow: true
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: 'watermark',
|
||||
component: 'pages/index/views/hooks-demo/useWatermark/index',
|
||||
name: 'UseWatermarkDemo',
|
||||
meta: {
|
||||
title: 'UseWaterMark'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'useScrollTo',
|
||||
component: 'pages/index/views/hooks-demo/useScrollTo/index',
|
||||
name: 'UseScrollToDemo',
|
||||
meta: {
|
||||
title: 'UseScrollTo'
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/icon',
|
||||
component: '#',
|
||||
name: 'IconsDemo',
|
||||
meta: {
|
||||
title: '图标',
|
||||
icon: 'icon'
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: 'index',
|
||||
component: 'pages/index/views/icons/index',
|
||||
name: 'Icons',
|
||||
meta: {
|
||||
title: '图标',
|
||||
icon: 'icon'
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/level',
|
||||
component: '#',
|
||||
redirect: '/level/menu1/menu1-1/menu1-1-1',
|
||||
name: 'Level',
|
||||
meta: {
|
||||
title: '多级菜单缓存',
|
||||
icon: 'nested'
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: 'menu1',
|
||||
name: 'Menu1Demo',
|
||||
component: '##Menu1Demo',
|
||||
redirect: '/level/menu1/menu1-1/menu1-1-1',
|
||||
meta: {
|
||||
title: 'Menu1'
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: 'menu1-1',
|
||||
name: 'Menu11Demo',
|
||||
component: '##Menu11Demo',
|
||||
redirect: '/level/menu1/menu1-1/menu1-1-1',
|
||||
meta: {
|
||||
title: 'Menu1-1',
|
||||
alwaysShow: true
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: 'menu1-1-1',
|
||||
name: 'Menu111Demo',
|
||||
component: 'pages/index/views/level/Menu111',
|
||||
meta: {
|
||||
title: 'Menu1-1-1'
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: 'menu1-2',
|
||||
name: 'Menu12Demo',
|
||||
component: 'pages/index/views/level/Menu12',
|
||||
meta: {
|
||||
title: 'Menu1-2'
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: 'menu2',
|
||||
name: 'Menu2Demo',
|
||||
component: 'pages/index/views/level/Menu2',
|
||||
meta: {
|
||||
title: 'Menu2'
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/example-demo',
|
||||
component: '#',
|
||||
name: 'ExampleDemo',
|
||||
redirect: '/example-demo/example-dialog',
|
||||
meta: {
|
||||
alwaysShow: true,
|
||||
icon: 'example',
|
||||
title: '综合实例'
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: 'example-dialog',
|
||||
component: 'pages/index/views/example-demo/example-dialog/index',
|
||||
name: 'ExampleDialog',
|
||||
meta: {
|
||||
title: '列表综合实例-弹窗'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'example-page',
|
||||
component: 'pages/index/views/example-demo/example-page/index',
|
||||
name: 'ExamplePage',
|
||||
meta: {
|
||||
title: '列表综合实例-页面'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'example-add',
|
||||
component: 'pages/index/views/example-demo/example-page/example-add',
|
||||
name: 'ExampleAdd',
|
||||
meta: {
|
||||
title: '列表综合实例-新增',
|
||||
noTagsView: true,
|
||||
noCache: true,
|
||||
hidden: true,
|
||||
showMainRoute: true,
|
||||
activeMenu: '/example-demo/example-page'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'example-edit',
|
||||
component: 'pages/index/views/example-demo/example-page/example-edit',
|
||||
name: 'ExampleEdit',
|
||||
meta: {
|
||||
title: '列表综合实例-编辑',
|
||||
noTagsView: true,
|
||||
noCache: true,
|
||||
hidden: true,
|
||||
showMainRoute: true,
|
||||
activeMenu: '/example-demo/example-page'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'example-detail',
|
||||
component: 'pages/index/views/example-demo/example-page/example-detail',
|
||||
name: 'ExampleDetail',
|
||||
meta: {
|
||||
title: '列表综合实例-详情',
|
||||
noTagsView: true,
|
||||
noCache: true,
|
||||
hidden: true,
|
||||
showMainRoute: true,
|
||||
activeMenu: '/example-demo/example-page'
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/role-demo',
|
||||
component: '#',
|
||||
redirect: '/role-demo/user',
|
||||
name: 'RoleDemo',
|
||||
meta: {
|
||||
title: '权限管理',
|
||||
icon: 'user',
|
||||
alwaysShow: true
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: 'user',
|
||||
component: 'pages/index/views/role-demo/user/index',
|
||||
name: 'User',
|
||||
meta: {
|
||||
title: '用户管理'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'role',
|
||||
component: 'pages/index/views/role-demo/role/index',
|
||||
name: 'Role',
|
||||
meta: {
|
||||
title: '角色管理'
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
@@ -1,6 +0,0 @@
|
||||
export interface Role {
|
||||
roleName: String
|
||||
id: String
|
||||
checkedNodes: any[]
|
||||
checkedkeys: any[]
|
||||
}
|
||||
Reference in New Issue
Block a user