adstract router
This commit is contained in:
parent
7d7556e075
commit
53f2199087
|
@ -0,0 +1,37 @@
|
||||||
|
const Document = r => require.ensure([], () => r(require('../views/demo/document.vue')), 'demo')
|
||||||
|
|
||||||
|
const BorderBox = r => require.ensure([], () => r(require('../views/demo/borderBox.vue')), 'demo')
|
||||||
|
|
||||||
|
const Decoration = r => require.ensure([], () => r(require('../views/demo/decoration.vue')), 'demo')
|
||||||
|
|
||||||
|
const Chart = r => require.ensure([], () => r(require('../views/demo/chart.vue')), 'demo')
|
||||||
|
|
||||||
|
const Table = r => require.ensure([], () => r(require('../views/demo/table.vue')), 'datav')
|
||||||
|
|
||||||
|
export default [
|
||||||
|
{
|
||||||
|
path: 'document',
|
||||||
|
name: 'document',
|
||||||
|
component: Document
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: 'borderBox',
|
||||||
|
name: 'borderBox',
|
||||||
|
component: BorderBox
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: 'decoration',
|
||||||
|
name: 'decoration',
|
||||||
|
component: Decoration
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: 'chart',
|
||||||
|
name: 'chart',
|
||||||
|
component: Chart
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: 'table',
|
||||||
|
name: 'table',
|
||||||
|
component: Table
|
||||||
|
}
|
||||||
|
]
|
|
@ -2,18 +2,10 @@ import Vue from 'vue'
|
||||||
|
|
||||||
import Router from 'vue-router'
|
import Router from 'vue-router'
|
||||||
|
|
||||||
|
import demoChildren from './demo'
|
||||||
|
|
||||||
const Demo = r => require.ensure([], () => r(require('../views/demo/index.vue')), 'demo')
|
const Demo = r => require.ensure([], () => r(require('../views/demo/index.vue')), 'demo')
|
||||||
|
|
||||||
const Document = r => require.ensure([], () => r(require('../views/demo/document.vue')), 'demo')
|
|
||||||
|
|
||||||
const BorderBox = r => require.ensure([], () => r(require('../views/demo/borderBox.vue')), 'demo')
|
|
||||||
|
|
||||||
const Decoration = r => require.ensure([], () => r(require('../views/demo/decoration.vue')), 'demo')
|
|
||||||
|
|
||||||
const Chart = r => require.ensure([], () => r(require('../views/demo/chart.vue')), 'demo')
|
|
||||||
|
|
||||||
const Table = r => require.ensure([], () => r(require('../views/demo/table.vue')), 'datav')
|
|
||||||
|
|
||||||
const Datav = r => require.ensure([], () => r(require('../views/datavEntrance/index.vue')), 'datav')
|
const Datav = r => require.ensure([], () => r(require('../views/datavEntrance/index.vue')), 'datav')
|
||||||
|
|
||||||
const View = r => require.ensure([], () => r(require('../views/dataView/index.vue')), 'datav')
|
const View = r => require.ensure([], () => r(require('../views/dataView/index.vue')), 'datav')
|
||||||
|
@ -27,31 +19,7 @@ export default new Router({
|
||||||
name: 'demo',
|
name: 'demo',
|
||||||
component: Demo,
|
component: Demo,
|
||||||
children: [
|
children: [
|
||||||
{
|
...demoChildren
|
||||||
path: 'document',
|
|
||||||
name: 'document',
|
|
||||||
component: Document
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: 'borderBox',
|
|
||||||
name: 'borderBox',
|
|
||||||
component: BorderBox
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: 'decoration',
|
|
||||||
name: 'decoration',
|
|
||||||
component: Decoration
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: 'chart',
|
|
||||||
name: 'chart',
|
|
||||||
component: Chart
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: 'table',
|
|
||||||
name: 'table',
|
|
||||||
component: Table
|
|
||||||
}
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue