router.push 当 path 相同时,log 打印错误捕
2020-04-09 本文已影响0人
Volcaner
router.push('your-path').catch(err => {})
const path = `/products/${id}`
if (this.$route.path !== path) this.$router.push(path)
router.push('your-path').catch(err => {})
const path = `/products/${id}`
if (this.$route.path !== path) this.$router.push(path)