web端产品库 vite版本

This commit is contained in:
aixianling
2022-04-27 18:18:57 +08:00
parent ee93320cad
commit 4f0178c627
172 changed files with 4520 additions and 16858 deletions

View File

@@ -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
}
}
}
})
}))