qinankun 使用bug logs
Failed to exectute 'replace' on 'Location'
- 因为
vue-router@4.x与vue-router@3.x版本不兼容导致 - 需要在
vue-router@3.x文件的afterEach 钩子中对state处理下
const router = new Router({
mode: 'history',
base: '/iot',
routes: [...routes, ...UseNorm]
})
export default router
router.afterEach((to, from, next) => {
const state = {
...history.state,
current: '/iot' + to.fullPath
}
history.replaceState(state, '', window.location.href)
})