From f02cf09eb0c6933dd5ccc4dac6c6c09c3b5f3d3c Mon Sep 17 00:00:00 2001 From: zhaowei <zhaowei> Date: 星期一, 25 八月 2025 15:17:03 +0800 Subject: [PATCH] 1、根据最新设计方案调整设备管理模块点击弹窗样式 2、mdc公司级首页设备管理模块与点击功能联调 --- src/router/index.js | 16 +++++++++++++++- 1 files changed, 15 insertions(+), 1 deletions(-) diff --git a/src/router/index.js b/src/router/index.js index bdbe374..8603811 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -4,8 +4,22 @@ Vue.use(Router) +// 瑙e喅鎶ラ敊 +const originalPush = Router.prototype.push +const originalReplace = Router.prototype.replace +// push +Router.prototype.push = function push (location, onResolve, onReject) { + if (onResolve || onReject) return originalPush.call(this, location, onResolve, onReject) + return originalPush.call(this, location).catch(err => err) +} +// replace +Router.prototype.replace = function push (location, onResolve, onReject) { + if (onResolve || onReject) return originalReplace.call(this, location, onResolve, onReject) + return originalReplace.call(this, location).catch(err => err) +} + export default new Router({ - mode: 'history', + mode: 'hash', base: process.env.BASE_URL, scrollBehavior: () => ({ y: 0 }), routes: constantRouterMap -- Gitblit v1.9.3