import-vue
v0.0.9
Published
vue路由快速引入
Downloads
2
Readme
import-vue
Vue 路由快速引入工具
安装
npm i import-vue
配置
arguments
教程
例子
以下注册路由的方式不同但结果是一样的
const importVue = require('import-vue');
import routerComponent from 'routerComponent'
new Router({
routes: [
{
path:'/routercomponent',
name:'routerName',
component:routerComponent,
//....
},
//OR
importVue('routerComponent'),
//OR
importVue('routerComponent','routerName'),
//OR
importVue('routerComponent','/routercomponent','routerName'),
//OR
importVue({
name:'routerComponent'
}),
//OR
importVue({
name:'routerComponent',
}),
//OR
importVue({
name:'routerComponent',
title:'routerName',
}),
//OR
importVue({
name:'routerComponent',
path:'/routercomponent'
}),
//OR
importVue({
name:'routerComponent',
title:'routerName',
path:'/routercomponent'
}),
]
})