router默认hash

This commit is contained in:
sunnie 2020-06-01 18:39:35 +08:00
parent 842a3eb0c7
commit 556eb3e45b

View File

@ -13,8 +13,8 @@ Vue.use(Router)
const createRouter = () =>
new Router({
mode: 'history',
base: process.env.BASE_URL,
// mode: 'history', // 如果你是 history模式 需要配置vue.config.js publicPath
// base: process.env.BASE_URL,
scrollBehavior: () => ({ y: 0 }),
routes: constantRouterMap
})