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

This commit is contained in:
RuoYi
2022-03-06 09:03:44 +08:00
parent 9f944c043f
commit 6130bebbb3
27 changed files with 57 additions and 52 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 }),