首页 > 其他 > 详细

路由配置

时间:2018-03-27 00:23:44      阅读:129      评论:0      收藏:0      [点我收藏+]

import Vue from ‘vue‘
import App from ‘./App‘
import VRouter from ‘vue-router‘
import Apple from ‘./components/apple‘
import World from ‘./components/world‘

Vue.config.productionTip = false
Vue.use(VRouter)
let router=new VRouter({
mode:‘history‘,
routes:[
{
path:‘/apple‘,
component:Apple
},
{
path:‘/world‘,
component:World
}
]
})
/* eslint-disable no-new */
new Vue({
el: ‘#app‘,
router,
components: { App },
template: ‘<App/>‘
})

路由配置

原文:https://www.cnblogs.com/dianzan/p/8654757.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!