19 lines
396 B
JavaScript
19 lines
396 B
JavaScript
import VueRouter from 'vue-router'
|
|
import autoRoutes from './autoRoutes'
|
|
import Vue from "vue";
|
|
|
|
autoRoutes.init()
|
|
Vue.use(VueRouter)
|
|
export default new VueRouter({
|
|
mode: 'history',
|
|
hashbang: false,
|
|
routes: [{path: "/", redirect: "/v", name: "产品库", component: import('../App')}],
|
|
scrollBehavior(to) {
|
|
if (to.hash) {
|
|
return {
|
|
selector: to.hash
|
|
}
|
|
}
|
|
}
|
|
})
|