疯狂的狮子Li
2023-01-31 771a1045ee3ef382d02b08afb620ef0b34d9d13a
ruoyi-ui/src/router/index.js
@@ -164,7 +164,14 @@
  }
]
// 防止连续点击多次路由报错
let routerPush = Router.prototype.push;
Router.prototype.push = function push(location) {
  return routerPush.call(this, location).catch(err => err)
}
export default new Router({
  base: process.env.VUE_APP_CONTEXT_PATH,
  mode: 'history', // 去掉url中的#
  scrollBehavior: () => ({ y: 0 }),
  routes: constantRoutes