You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
368 B
25 lines
368 B
import Vue from "vue";
|
|
import VueRouter from "vue-router";
|
|
|
|
// 引入组件
|
|
import test from "~/pages/test";
|
|
|
|
// 要告诉 vue 使用 vueRouter
|
|
Vue.use(VueRouter);
|
|
|
|
const routes = [
|
|
{
|
|
path: "/",
|
|
redirect: '/home'
|
|
},
|
|
{
|
|
path: "/home",
|
|
component: test
|
|
}
|
|
]
|
|
|
|
let router = new VueRouter({
|
|
routes
|
|
})
|
|
export default router;
|