2017-11-03 04:04:39 +00:00
|
|
|
const AsyncComp = () => {
|
|
|
|
const pathnameArr = window.location.pathname.split('/')
|
|
|
|
const com = pathnameArr[1] || 'button'
|
2017-11-03 10:46:18 +00:00
|
|
|
const demo = pathnameArr[2] || 'index'
|
2017-11-03 04:04:39 +00:00
|
|
|
return {
|
|
|
|
component: import(`../components/${com}/demo/${demo}.vue`),
|
|
|
|
}
|
|
|
|
}
|
|
|
|
export default [
|
|
|
|
{ path: '/*', component: AsyncComp },
|
|
|
|
]
|