import Vue from 'vue';//引入Vue对象，因为要用它的use
import Router from 'vue-router'//引入vue-router
//引入你需要配置的组件
import MyHello from '../components/MyHello.vue'
//使用路由插件
Vue.use(Router);

//配置路由
const router =  new Router({
    routes: [
        {
            path:"/hello",
            component:MyHello
        },
        //路由懒加载(按需加载)
        {
            path: '/map',
            name: 'map',
            component: () => import('../pages/map.vue')
        },{
            path: '/call_room',
            name: 'call_room',
            component: () => import('../pages/call_room.vue')
        }
    ]
});

//导出
export default router;
