feat: 迁移嵌套页面演示

This commit is contained in:
FairyEver
2020-08-31 22:13:41 +08:00
parent e8f9fc53a3
commit 9485aabf31
10 changed files with 15 additions and 60 deletions

View File

@@ -1,20 +0,0 @@
import layoutHeaderAside from '@/layout/header-aside'
// 由于懒加载页面太多的话会造成webpack热更新太慢所以开发环境不使用懒加载只有生产环境使用懒加载
const _import = require('@/libs/util.import.' + process.env.NODE_ENV)
const meta = { auth: true }
export default {
path: '/demo/frame',
name: 'demo-frame',
meta,
redirect: { name: 'demo-frame-index' },
component: layoutHeaderAside,
children: (pre => [
{ path: 'index', name: `${pre}index`, component: _import('demo/frame/index'), meta: { ...meta, title: 'Frame 首页' } },
{ path: 'html', name: `${pre}html`, component: _import('demo/frame/html'), meta: { ...meta, title: '静态 HTML' } },
{ path: 'report', name: `${pre}report`, component: _import('demo/frame/report'), meta: { ...meta, title: 'Size report' } },
{ path: 'd2-doc', name: `${pre}d2-doc`, component: _import('demo/frame/d2-doc'), meta: { ...meta, title: 'D2Admin 中文文档' } }
])('demo-frame-')
}

View File

@@ -39,6 +39,9 @@ export default {
{ path: 'log/log', name: `${pre}log-log`, component: _import('demo/playground/log/log'), meta: { ...meta, title: '日志记录' } },
{ path: 'add-routes/routes', name: `${pre}add-routes-routes`, component: _import('demo/playground/add-routes/routes'), meta: { ...meta, title: '添加页面' } },
{ path: 'env', name: `${pre}env`, component: _import('demo/playground/env'), meta: { ...meta, title: '环境信息' } },
{ path: 'locales', name: `${pre}locales`, component: _import('demo/playground/locales'), meta: { ...meta, title: '国际化' } }
{ path: 'locales', name: `${pre}locales`, component: _import('demo/playground/locales'), meta: { ...meta, title: '国际化' } },
{ path: 'frame/html', name: `${pre}frame-html`, component: _import('demo/playground/frame/html'), meta: { ...meta, title: '静态 HTML' } },
{ path: 'frame/report', name: `${pre}frame-report`, component: _import('demo/playground/frame/report'), meta: { ...meta, title: 'Size report' } },
{ path: 'frame/d2-doc', name: `${pre}frame-d2-doc`, component: _import('demo/playground/frame/d2-doc'), meta: { ...meta, title: 'D2Admin 中文文档' } }
])('demo-playground-')
}

View File

@@ -1,5 +1,4 @@
import playground from './modules/playground'
import frame from './modules/frame'
import d2Crud from './modules/d2-crud'
import d2CrudPlus from './modules/d2-crud-plus'
import plugins from './modules/plugins'
@@ -58,7 +57,6 @@ const frameIn = [
]
},
playground,
frame,
d2Crud,
d2CrudPlus,
plugins,