import Vue from 'vue'import VueRouter from 'vue-router'// "@"相当于".."import Detail from '../pages/goodsDetail'import Msg from '../components/message.vue'// 使用路由Vue.use(VueRouter)export default new VueRouter({ mode: 'history', routes: [ { // 进行路由配置,规定'/'引入到home组件 path: '/', component: resolve => require(['../pages/home.vue'], resolve), meta: { title: 'home' } }, { path: '/msg', component: Msg }, { path: '/detail', component: Detail, children: [ { path: 'msg', component: Msg } ] } ]})原代码如上,其中这一段 component: resolve => require(['../pages/home.vue'], resolve), meta: { title: 'home' }1.不知道这第一行是什么意思,和import引入组件模块有什么区别?2.meta部分是什么含义?去掉没发现有什么改变求指教~谢谢!!
添加回答
举报
0/150
提交
取消