⚠️ 把router里的mode: 'history
换成mode: 'hash',
就好了
const createRouter = () => new Router({
// mode: 'history', // require service support
mode: 'hash',
scrollBehavior: () => ({ y: 0 }),
routes: constantRoutes
})
const router = createRouter()