2021-12-14 18:36:19 +08:00
|
|
|
import VueRouter from 'vue-router'
|
|
|
|
|
import autoRoutes from './autoRoutes'
|
2022-04-27 19:36:32 +08:00
|
|
|
import Vue from "vue";
|
2021-12-14 18:36:19 +08:00
|
|
|
|
2022-04-27 19:36:32 +08:00
|
|
|
autoRoutes.init()
|
2021-12-14 18:36:19 +08:00
|
|
|
Vue.use(VueRouter)
|
2022-04-27 19:36:32 +08:00
|
|
|
export default new VueRouter({
|
2021-12-14 18:36:19 +08:00
|
|
|
mode: 'history',
|
|
|
|
|
hashbang: false,
|
2022-05-10 11:27:19 +08:00
|
|
|
routes: [{path: "/", redirect: "/v", name: "产品库", component: import('../App')}],
|
2021-12-14 18:36:19 +08:00
|
|
|
scrollBehavior(to) {
|
|
|
|
|
if (to.hash) {
|
|
|
|
|
return {
|
|
|
|
|
selector: to.hash
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
2022-04-27 19:36:32 +08:00
|
|
|
})
|