Vue报错避免冗余导航解决方法

tech2022-09-16  54

具体报错信息如图

解决方案

在导航点击事件中加入catch捕获方法

click() { this.$router.replace(this.path).catch(err => err) }
最新回复(0)