解决方式:
在push语句中添加catch捕捉错误
router.push('your-path').catch(err => {})
详细信息:
https://github.com/vuejs/vue-router/issues/2872
在push语句中添加catch捕捉错误
router.push('your-path').catch(err => {})
https://github.com/vuejs/vue-router/issues/2872