style: 🎨 菜单和路由使用最直观的描述方法
This commit is contained in:
@@ -2,88 +2,88 @@ export default {
|
||||
path: '/demo/components',
|
||||
title: '组件',
|
||||
icon: 'puzzle-piece',
|
||||
children: (pre => [
|
||||
{ path: `${pre}index`, title: '扩展组件', icon: 'home' },
|
||||
children: [
|
||||
{ path: '/demo/components/index', title: '扩展组件', icon: 'home' },
|
||||
{
|
||||
path: `${pre}container`,
|
||||
path: '/demo/components/container',
|
||||
title: '布局容器',
|
||||
icon: 'window-restore',
|
||||
children: [
|
||||
{
|
||||
title: '填充型',
|
||||
children: [
|
||||
{ path: `${pre}container/full`, title: '基础', icon: '' },
|
||||
{ path: `${pre}container/full-slot`, title: '插槽', icon: '' },
|
||||
{ path: `${pre}container/full-bs`, title: '滚动优化', icon: '' }
|
||||
{ path: '/demo/components/container/full', title: '基础', icon: '' },
|
||||
{ path: '/demo/components/container/full-slot', title: '插槽', icon: '' },
|
||||
{ path: '/demo/components/container/full-bs', title: '滚动优化', icon: '' }
|
||||
]
|
||||
},
|
||||
{
|
||||
title: '隐形模式',
|
||||
children: [
|
||||
{ path: `${pre}container/ghost`, title: '基础', icon: '' },
|
||||
{ path: `${pre}container/ghost-slot`, title: '插槽', icon: '' },
|
||||
{ path: `${pre}container/ghost-bs`, title: '滚动优化', icon: '' }
|
||||
{ path: '/demo/components/container/ghost', title: '基础', icon: '' },
|
||||
{ path: '/demo/components/container/ghost-slot', title: '插槽', icon: '' },
|
||||
{ path: '/demo/components/container/ghost-bs', title: '滚动优化', icon: '' }
|
||||
]
|
||||
},
|
||||
{
|
||||
title: '卡片型',
|
||||
children: [
|
||||
{ path: `${pre}container/card`, title: '基础', icon: '' },
|
||||
{ path: `${pre}container/card-slot`, title: '插槽', icon: '' },
|
||||
{ path: `${pre}container/card-bs`, title: '滚动优化', icon: '' }
|
||||
{ path: '/demo/components/container/card', title: '基础', icon: '' },
|
||||
{ path: '/demo/components/container/card-slot', title: '插槽', icon: '' },
|
||||
{ path: '/demo/components/container/card-bs', title: '滚动优化', icon: '' }
|
||||
]
|
||||
},
|
||||
{
|
||||
title: '方法',
|
||||
children: [
|
||||
{ path: `${pre}container/api?bs=false`, title: '滚动控制', icon: '' },
|
||||
{ path: `${pre}container/api?bs=true`, title: '滚动控制 BS', icon: '' }
|
||||
{ path: '/demo/components/container/api?bs=false', title: '滚动控制', icon: '' },
|
||||
{ path: '/demo/components/container/api?bs=true', title: '滚动控制 BS', icon: '' }
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: `${pre}layout/grid`,
|
||||
path: '/demo/components/layout/grid',
|
||||
title: '高级布局',
|
||||
icon: 'tasks',
|
||||
children: [
|
||||
{ path: `${pre}layout/grid`, title: '拖拽位置和大小' },
|
||||
{ path: `${pre}layout/splitpane`, title: '区域划分' }
|
||||
{ path: '/demo/components/layout/grid', title: '拖拽位置和大小' },
|
||||
{ path: '/demo/components/layout/splitpane', title: '区域划分' }
|
||||
]
|
||||
},
|
||||
{
|
||||
path: `${pre}editor`,
|
||||
path: '/demo/components/editor',
|
||||
title: '编辑器',
|
||||
icon: 'pencil-square-o',
|
||||
children: [
|
||||
{ path: `${pre}editor-ueditor`, title: 'UEditor', icon: '' },
|
||||
{ path: `${pre}editor-quill`, title: 'Quill', icon: '' },
|
||||
{ path: `${pre}editor-simpleMDE`, title: 'simpleMDE', icon: '' }
|
||||
{ path: '/demo/components/editor-ueditor', title: 'UEditor', icon: '' },
|
||||
{ path: '/demo/components/editor-quill', title: 'Quill', icon: '' },
|
||||
{ path: '/demo/components/editor-simpleMDE', title: 'simpleMDE', icon: '' }
|
||||
]
|
||||
},
|
||||
{
|
||||
path: `${pre}icon`,
|
||||
path: '/demo/components/icon',
|
||||
title: '图标',
|
||||
icon: 'star',
|
||||
children: [
|
||||
{ path: `${pre}icon/icon`, title: '图标组件' },
|
||||
{ path: `${pre}icon/icon-svg`, title: 'svg 图标组件' },
|
||||
{ path: `${pre}icon/select`, title: '图标选择器' },
|
||||
{ path: `${pre}icon/select-svg`, title: 'svg 图标选择器' },
|
||||
{ path: `${pre}icon/list`, title: 'FontAwesome' }
|
||||
{ path: '/demo/components/icon/icon', title: '图标组件' },
|
||||
{ path: '/demo/components/icon/icon-svg', title: 'svg 图标组件' },
|
||||
{ path: '/demo/components/icon/select', title: '图标选择器' },
|
||||
{ path: '/demo/components/icon/select-svg', title: 'svg 图标选择器' },
|
||||
{ path: '/demo/components/icon/list', title: 'FontAwesome' }
|
||||
]
|
||||
},
|
||||
{
|
||||
path: `${pre}markdown`,
|
||||
path: '/demo/components/markdown',
|
||||
title: 'markdown 解析',
|
||||
icon: 'file-text-o',
|
||||
children: [
|
||||
{ path: `${pre}markdown/source`, title: '指定资源' },
|
||||
{ path: `${pre}markdown/url`, title: '异步加载文件' }
|
||||
{ path: '/demo/components/markdown/source', title: '指定资源' },
|
||||
{ path: '/demo/components/markdown/url', title: '异步加载文件' }
|
||||
]
|
||||
},
|
||||
{ path: `${pre}countup`, title: '数字动画', icon: 'motorcycle' },
|
||||
{ path: `${pre}highlight`, title: '代码高亮显示', icon: 'code' },
|
||||
{ path: `${pre}json-tree`, title: 'JSON 展示', icon: 'sitemap' }
|
||||
])('/demo/components/')
|
||||
{ path: '/demo/components/countup', title: '数字动画', icon: 'motorcycle' },
|
||||
{ path: '/demo/components/highlight', title: '代码高亮显示', icon: 'code' },
|
||||
{ path: '/demo/components/json-tree', title: 'JSON 展示', icon: 'sitemap' }
|
||||
]
|
||||
}
|
||||
|
||||
@@ -2,8 +2,8 @@ export default {
|
||||
path: '/demo/playground',
|
||||
title: '功能',
|
||||
icon: 'flask',
|
||||
children: (pre => [
|
||||
{ path: `${pre}index`, title: '功能', icon: 'home' },
|
||||
children: [
|
||||
{ path: '/demo/playground/index', title: '功能', icon: 'home' },
|
||||
{
|
||||
title: 'svg 菜单图标',
|
||||
iconSvg: 'd2-admin',
|
||||
@@ -38,13 +38,13 @@ export default {
|
||||
]
|
||||
},
|
||||
{
|
||||
path: `${pre}frame`,
|
||||
path: '/demo/playground/frame',
|
||||
title: '内嵌网页',
|
||||
icon: 'globe',
|
||||
children: [
|
||||
{ path: `${pre}frame/d2-doc`, title: 'D2Admin 中文文档', iconSvg: 'd2-admin' },
|
||||
{ path: `${pre}frame/html`, title: '静态 HTML', icon: 'code' },
|
||||
{ path: `${pre}frame/report`, title: '构建分析', icon: 'pie-chart' }
|
||||
{ path: '/demo/playground/frame/d2-doc', title: 'D2Admin 中文文档', iconSvg: 'd2-admin' },
|
||||
{ path: '/demo/playground/frame/html', title: '静态 HTML', icon: 'code' },
|
||||
{ path: '/demo/playground/frame/report', title: '构建分析', icon: 'pie-chart' }
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -60,74 +60,74 @@ export default {
|
||||
]
|
||||
},
|
||||
{
|
||||
path: `${pre}store`,
|
||||
path: '/demo/playground/store',
|
||||
title: '全局状态管理',
|
||||
icon: 'bolt',
|
||||
children: [
|
||||
{ path: `${pre}store/page`, title: '多标签页控制', icon: 'window-restore' },
|
||||
{ path: `${pre}store/menu`, title: '菜单控制', icon: 'bars' },
|
||||
{ path: `${pre}store/size`, title: '全局尺寸', icon: 'font' },
|
||||
{ path: `${pre}store/ua`, title: '浏览器信息', icon: 'info-circle' },
|
||||
{ path: `${pre}store/gray`, title: '灰度模式', icon: 'eye' },
|
||||
{ path: `${pre}store/fullscreen`, title: '全屏', icon: 'arrows-alt' },
|
||||
{ path: `${pre}store/theme`, title: '主题', icon: 'diamond' },
|
||||
{ path: `${pre}store/transition`, title: '页面过渡开关', icon: 'toggle-on' }
|
||||
{ path: '/demo/playground/store/page', title: '多标签页控制', icon: 'window-restore' },
|
||||
{ path: '/demo/playground/store/menu', title: '菜单控制', icon: 'bars' },
|
||||
{ path: '/demo/playground/store/size', title: '全局尺寸', icon: 'font' },
|
||||
{ path: '/demo/playground/store/ua', title: '浏览器信息', icon: 'info-circle' },
|
||||
{ path: '/demo/playground/store/gray', title: '灰度模式', icon: 'eye' },
|
||||
{ path: '/demo/playground/store/fullscreen', title: '全屏', icon: 'arrows-alt' },
|
||||
{ path: '/demo/playground/store/theme', title: '主题', icon: 'diamond' },
|
||||
{ path: '/demo/playground/store/transition', title: '页面过渡开关', icon: 'toggle-on' }
|
||||
]
|
||||
},
|
||||
{
|
||||
path: `${pre}page-cache`,
|
||||
path: '/demo/playground/page-cache',
|
||||
title: '页面缓存',
|
||||
icon: 'hdd-o',
|
||||
children: [
|
||||
{ path: `${pre}page-cache/on`, title: '开启缓存' },
|
||||
{ path: `${pre}page-cache/off`, title: '关闭缓存' },
|
||||
{ path: `${pre}page-cache/params/1`, title: '带参路由缓存 1' },
|
||||
{ path: `${pre}page-cache/params/2`, title: '带参路由缓存 2' }
|
||||
{ path: '/demo/playground/page-cache/on', title: '开启缓存' },
|
||||
{ path: '/demo/playground/page-cache/off', title: '关闭缓存' },
|
||||
{ path: '/demo/playground/page-cache/params/1', title: '带参路由缓存 1' },
|
||||
{ path: '/demo/playground/page-cache/params/2', title: '带参路由缓存 2' }
|
||||
]
|
||||
},
|
||||
{
|
||||
path: `${pre}page-argu`,
|
||||
path: '/demo/playground/page-argu',
|
||||
title: '参数传递和留存',
|
||||
icon: 'assistive-listening-systems',
|
||||
children: [
|
||||
{ path: `${pre}page-argu/send`, title: '发送' },
|
||||
{ path: `${pre}page-argu/get/username-from-menu?userid=userid-from-menu`, title: '接收' }
|
||||
{ path: '/demo/playground/page-argu/send', title: '发送' },
|
||||
{ path: '/demo/playground/page-argu/get/username-from-menu?userid=userid-from-menu', title: '接收' }
|
||||
]
|
||||
},
|
||||
{
|
||||
path: `${pre}db`,
|
||||
path: '/demo/playground/db',
|
||||
title: '数据持久化',
|
||||
icon: 'database',
|
||||
children: [
|
||||
{ path: `${pre}db/all`, title: '总览', icon: 'table' },
|
||||
{ path: `${pre}db/public`, title: '公共存储', icon: 'users' },
|
||||
{ path: `${pre}db/user`, title: '私有数据', icon: 'user' },
|
||||
{ path: `${pre}db/page-public`, title: '路由存储', icon: 'file-o' },
|
||||
{ path: `${pre}db/page-user`, title: '私有路由存储', icon: 'file-o' },
|
||||
{ path: `${pre}db/page-snapshot-public`, title: '路由快照', icon: 'file' },
|
||||
{ path: `${pre}db/page-snapshot-user`, title: '私有路由快照', icon: 'file' }
|
||||
{ path: '/demo/playground/db/all', title: '总览', icon: 'table' },
|
||||
{ path: '/demo/playground/db/public', title: '公共存储', icon: 'users' },
|
||||
{ path: '/demo/playground/db/user', title: '私有数据', icon: 'user' },
|
||||
{ path: '/demo/playground/db/page-public', title: '路由存储', icon: 'file-o' },
|
||||
{ path: '/demo/playground/db/page-user', title: '私有路由存储', icon: 'file-o' },
|
||||
{ path: '/demo/playground/db/page-snapshot-public', title: '路由快照', icon: 'file' },
|
||||
{ path: '/demo/playground/db/page-snapshot-user', title: '私有路由快照', icon: 'file' }
|
||||
]
|
||||
},
|
||||
{
|
||||
path: `${pre}log`,
|
||||
path: '/demo/playground/log',
|
||||
title: '日志',
|
||||
icon: 'bullseye',
|
||||
children: [
|
||||
{ path: `${pre}log/log`, title: '日志记录', icon: 'dot-circle-o' },
|
||||
{ path: `${pre}log/error`, title: '错误捕捉', icon: 'bug' },
|
||||
{ path: `${pre}log/ajax`, title: 'Ajax 错误', icon: 'bug' },
|
||||
{ path: `${pre}log/console`, title: '控制台日志', icon: 'lightbulb-o' }
|
||||
{ path: '/demo/playground/log/log', title: '日志记录', icon: 'dot-circle-o' },
|
||||
{ path: '/demo/playground/log/error', title: '错误捕捉', icon: 'bug' },
|
||||
{ path: '/demo/playground/log/ajax', title: 'Ajax 错误', icon: 'bug' },
|
||||
{ path: '/demo/playground/log/console', title: '控制台日志', icon: 'lightbulb-o' }
|
||||
]
|
||||
},
|
||||
{
|
||||
path: `${pre}add-routes`,
|
||||
path: '/demo/playground/add-routes',
|
||||
title: '动态添加路由',
|
||||
icon: 'plus-square',
|
||||
children: [
|
||||
{ path: `${pre}add-routes/routes`, title: '添加页面', icon: 'file-o' }
|
||||
{ path: '/demo/playground/add-routes/routes', title: '添加页面', icon: 'file-o' }
|
||||
]
|
||||
},
|
||||
{ path: `${pre}env`, title: '环境信息', icon: 'exclamation-circle' },
|
||||
{ path: `${pre}locales`, title: '国际化', icon: 'language' }
|
||||
])('/demo/playground/')
|
||||
{ path: '/demo/playground/env', title: '环境信息', icon: 'exclamation-circle' },
|
||||
{ path: '/demo/playground/locales', title: '国际化', icon: 'language' }
|
||||
]
|
||||
}
|
||||
|
||||
@@ -2,37 +2,37 @@ export default {
|
||||
path: '/demo/plugins',
|
||||
title: '插件',
|
||||
icon: 'plug',
|
||||
children: (pre => [
|
||||
{ path: `${pre}index`, title: '插件', icon: 'home' },
|
||||
children: [
|
||||
{ path: '/demo/plugins/index', title: '插件', icon: 'home' },
|
||||
{
|
||||
path: `${pre}import`,
|
||||
path: '/demo/plugins/import',
|
||||
title: '导入',
|
||||
icon: 'download',
|
||||
children: [
|
||||
{ path: `${pre}import/csv`, title: 'csv' },
|
||||
{ path: `${pre}import/xlsx`, title: 'xlsx' }
|
||||
{ path: '/demo/plugins/import/csv', title: 'csv' },
|
||||
{ path: '/demo/plugins/import/xlsx', title: 'xlsx' }
|
||||
]
|
||||
},
|
||||
{
|
||||
path: `${pre}export`,
|
||||
path: '/demo/plugins/export',
|
||||
title: '导出',
|
||||
icon: 'upload',
|
||||
children: [
|
||||
{ path: `${pre}export/table`, title: '表格' },
|
||||
{ path: `${pre}export/txt`, title: '文本' }
|
||||
{ path: '/demo/plugins/export/table', title: '表格' },
|
||||
{ path: '/demo/plugins/export/txt', title: '文本' }
|
||||
]
|
||||
},
|
||||
{
|
||||
path: `${pre}better-scroll`,
|
||||
path: '/demo/plugins/better-scroll',
|
||||
title: '滚动扩展',
|
||||
icon: 'crosshairs',
|
||||
children: [
|
||||
{ path: `${pre}better-scroll/base`, title: '基础用法' },
|
||||
{ path: `${pre}better-scroll/to`, title: '滚动定位' }
|
||||
{ path: '/demo/plugins/better-scroll/base', title: '基础用法' },
|
||||
{ path: '/demo/plugins/better-scroll/to', title: '滚动定位' }
|
||||
]
|
||||
},
|
||||
{ path: `${pre}clipboard-polyfill`, title: '剪贴板访问', icon: 'clipboard' },
|
||||
{ path: `${pre}day`, title: '日期计算', icon: 'clock-o' },
|
||||
{ path: `${pre}js-cookie`, title: 'Cookie 读写', icon: 'asterisk' }
|
||||
])('/demo/plugins/')
|
||||
{ path: '/demo/plugins/clipboard-polyfill', title: '剪贴板访问', icon: 'clipboard' },
|
||||
{ path: '/demo/plugins/day', title: '日期计算', icon: 'clock-o' },
|
||||
{ path: '/demo/plugins/js-cookie', title: 'Cookie 读写', icon: 'asterisk' }
|
||||
]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user