路由配置

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/>'
})

posted @ 2018-03-26 23:11  ThisCall  阅读(102)  评论(0编辑  收藏  举报