web端产品库 vite版本
This commit is contained in:
@@ -3,16 +3,20 @@ import VueRouter from 'vue-router'
|
||||
import autoRoutes from './autoRoutes'
|
||||
|
||||
Vue.use(VueRouter)
|
||||
autoRoutes.init()
|
||||
export default new VueRouter({
|
||||
|
||||
export default autoRoutes.init().then(() => new VueRouter({
|
||||
mode: 'history',
|
||||
hashbang: false,
|
||||
routes: autoRoutes.routes(),
|
||||
routes: [
|
||||
{path: "/", name: "产品库"},
|
||||
...autoRoutes.routes
|
||||
],
|
||||
scrollBehavior(to) {
|
||||
console.log(to)
|
||||
if (to.hash) {
|
||||
return {
|
||||
selector: to.hash
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
}))
|
||||
|
||||
Reference in New Issue
Block a user