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.
45 lines
970 B
45 lines
970 B
import Vue from "vue"; |
|
import VueRouter from "vue-router"; |
|
import AVueRouter from "./avue-router"; |
|
import HomeView from "../views/homePage/homePage.vue"; |
|
|
|
Vue.use(VueRouter); |
|
|
|
const routes = [ |
|
{ |
|
path: "/", |
|
name: "home", |
|
redirect: "/homePage", |
|
// component: HomeView, |
|
}, |
|
{ |
|
path: "/homePage", |
|
name: "homePage", |
|
// redirect: "/homePage", |
|
component: HomeView, |
|
}, |
|
{ |
|
path: "/about", |
|
name: "about", |
|
// route level code-splitting |
|
// this generates a separate chunk (about.[hash].js) for this route |
|
// which is lazy-loaded when the route is visited. |
|
component: () => import(/* webpackChunkName: "about" */ "../views/AboutView.vue"), |
|
}, |
|
]; |
|
|
|
// // 初始化和注册 AvueRouter |
|
// AvueRouter.install(Vue, { |
|
// router: Router, |
|
// store: Store, |
|
// i18n: i18n, |
|
// keepAlive: false, |
|
// }); |
|
|
|
const router = new VueRouter({ |
|
mode: "history", |
|
base: process.env.BASE_URL, |
|
routes, |
|
}); |
|
|
|
export default router;
|
|
|