mirror of
https://gitee.com/beijing_hongye_huicheng/lilishop-ui.git
synced 2025-12-17 16:35:53 +08:00
修改菜单栏重复点击console会显示bug , 以及行政地区不回显问题
This commit is contained in:
@@ -13,6 +13,14 @@ const RouterConfig = {
|
||||
routes: routers
|
||||
};
|
||||
|
||||
/**
|
||||
* 解决重复点击菜单会控制台报错bug
|
||||
*/
|
||||
const routerPush = VueRouter.prototype.push
|
||||
VueRouter.prototype.push = function push(location) {
|
||||
return routerPush.call(this, location).catch(error=> error)
|
||||
}
|
||||
|
||||
export const router = new VueRouter(RouterConfig);
|
||||
|
||||
router.beforeEach((to, from, next) => {
|
||||
@@ -44,3 +52,5 @@ router.afterEach((to) => {
|
||||
ViewUI.LoadingBar.finish();
|
||||
window.scrollTo(0, 0);
|
||||
});
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user