Merge pull request #4551 from break60/dev

[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:
xingchun-chen 2021-01-25 15:02:21 +08:00 committed by GitHub
commit 69445e3cfc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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()