mirror of
https://github.com/sunniejs/vue-h5-template.git
synced 2025-04-06 03:57:50 +08:00
router默认hash
This commit is contained in:
parent
842a3eb0c7
commit
556eb3e45b
@ -13,8 +13,8 @@ Vue.use(Router)
|
|||||||
|
|
||||||
const createRouter = () =>
|
const createRouter = () =>
|
||||||
new Router({
|
new Router({
|
||||||
mode: 'history',
|
// mode: 'history', // 如果你是 history模式 需要配置vue.config.js publicPath
|
||||||
base: process.env.BASE_URL,
|
// base: process.env.BASE_URL,
|
||||||
scrollBehavior: () => ({ y: 0 }),
|
scrollBehavior: () => ({ y: 0 }),
|
||||||
routes: constantRouterMap
|
routes: constantRouterMap
|
||||||
})
|
})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user