falvpingtai/src/router.js

16 lines
288 B
JavaScript
Raw Normal View History

2019-11-25 08:43:09 +08:00
import Vue from 'vue'
//1.导入路由组件vue-router
import Router from 'vue-router'
//2.调用vue-router
Vue.use(Router)
2019-11-25 08:44:51 +08:00
import hello from "./components/HelloWrld"
2019-11-25 08:43:09 +08:00
const router=new Router({
routes: [
2019-11-25 08:44:51 +08:00
{
path: '/',
component: hello
}
2019-11-25 08:43:09 +08:00
]
});
2019-11-25 08:44:51 +08:00
export default router;