开启TopNav没有子菜单情况隐藏侧边栏

This commit is contained in:
RuoYi
2022-03-06 09:05:56 +08:00
parent 4feb0adb6e
commit 8b3d75a6a0
28 changed files with 59 additions and 54 deletions

View File

@@ -164,6 +164,12 @@ export const dynamicRoutes = [
}
]
// 防止连续点击多次路由报错
let routerPush = Router.prototype.push;
Router.prototype.push = function push(location) {
return routerPush.call(this, location).catch(err => err)
}
export default new Router({
mode: 'history', // 去掉url中的#
scrollBehavior: () => ({ y: 0 }),