no message

Former-commit-id: a7c4a5db0e74c6f70083cf0d11c636e0f9b2dce4
This commit is contained in:
liyang
2018-10-12 09:54:53 +08:00
parent a6a9e5ae69
commit a60f3e5118
8 changed files with 31 additions and 36 deletions
+4 -4
View File
@@ -2,12 +2,12 @@
export default [
{ path: '/index', title: '首页', icon: 'home' },
{
title: '页面',
title: '演示页面',
icon: 'folder-o',
children: [
{ path: '/page1', title: '页面 1' },
{ path: '/page2', title: '页面 2' },
{ path: '/page3', title: '页面 3' }
{ path: '/demo/page1', title: '页面 1' },
{ path: '/demo/page2', title: '页面 2' },
{ path: '/demo/page3', title: '页面 3' }
]
}
]
+4 -4
View File
@@ -2,12 +2,12 @@
export default [
{ path: '/index', title: '首页', icon: 'home' },
{
title: '页面',
title: '演示页面',
icon: 'folder-o',
children: [
{ path: '/page1', title: '页面 1' },
{ path: '/page2', title: '页面 2' },
{ path: '/page3', title: '页面 3' }
{ path: '/demo/page1', title: '页面 1' },
{ path: '/demo/page2', title: '页面 2' },
{ path: '/demo/page3', title: '页面 3' }
]
}
]
+16
View File
@@ -0,0 +1,16 @@
import layoutHeaderAside from '@/layout/header-aside'
const meta = { requiresAuth: true }
export default {
path: '/demo',
name: 'demo',
meta,
redirect: { name: 'demo-page1' },
component: layoutHeaderAside,
children: (pre => [
{ path: 'page1', name: `${pre}page1`, component: () => import('@/pages/demo/page1'), meta: { meta, title: '页面 1' } },
{ path: 'page2', name: `${pre}page2`, component: () => import('@/pages/demo/page2'), meta: { meta, title: '页面 2' } },
{ path: 'page3', name: `${pre}page3`, component: () => import('@/pages/demo/page3'), meta: { meta, title: '页面 3' } }
])('demo-')
}
+6 -27
View File
@@ -1,4 +1,5 @@
// layout
import demo from './modules/demo'
import layoutHeaderAside from '@/layout/header-aside'
const meta = { requiresAuth: true }
@@ -17,27 +18,10 @@ const frameIn = [
name: 'index',
meta,
component: () => import('@/pages/index')
},
{
path: '/page1',
name: 'page1',
component: () => import('@/pages/page1'),
meta: { meta, title: '页面 1' }
},
{
path: '/page2',
name: 'page2',
component: () => import('@/pages/page2'),
meta: { meta, title: '页面 2' }
},
{
path: '/page3',
name: 'page3',
component: () => import('@/pages/page3'),
meta: { meta, title: '页面 3' }
}
]
}
},
demo
]
/**
@@ -48,13 +32,8 @@ const frameOut = [
{
path: '/redirect/:path*',
component: {
beforeCreate () {
const path = this.$route.params.path
this.$router.replace(JSON.parse(path))
},
render: function (h) {
return h()
}
beforeCreate () { this.$router.replace(JSON.parse(this.$route.params.path)) },
render: h => h()
}
},
// 登录