标签:keyword 参考 loading word java imp pat json ejs
vue router 的路由导入方式可用以下两种:
一:直接导入
import Hello from ‘@/components/Hello‘
resolve: { extensions: [‘.js‘, ‘.vue‘, ‘.json‘], alias: { ‘vue$‘: ‘vue/dist/vue.esm.js‘, ‘@‘: resolve(‘src‘) } }
const Foo = resolve =>{ require.ensure([‘./Foo.vue‘,() => { resolve(require(‘./Foo.vue‘)) }]) }
const Foo = resolve => require([‘./Foo.vue‘], resolve);
const router = new VueRouter({ routes: [ { path: ‘/foo‘, component: Foo } ] })
标签:keyword 参考 loading word java imp pat json ejs
原文地址:http://www.cnblogs.com/zhou-lei/p/6953978.html