[Improvement-4550][ui]Fix the problem of Uncaught (in promise) NavigationDuplicated: Avoided redundant navigation when clicking on the same route

This commit is contained in:
break60 2021-01-25 10:22:31 +08:00
parent c9df981e3d
commit 2289ba48b8

View File

@ -558,6 +558,11 @@ const router = new Router({
]
})
const VueRouterPush = Router.prototype.push
Router.prototype.push = function push (to) {
return VueRouterPush.call(this, to).catch(err => err)
}
router.beforeEach((to, from, next) => {
const $body = $('body')
$body.find('.tooltip.fade.top.in').remove()