原因:因为点击事件的时候调用了两次
解决办法:只要一次就不会报错
changer(val) {
console.log(val, this.$route, "changer");
if (this.$route.name != val) {
this.$router.push({
name: val
});
}
}
原因:因为点击事件的时候调用了两次
解决办法:只要一次就不会报错
changer(val) {
console.log(val, this.$route, "changer");
if (this.$route.name != val) {
this.$router.push({
name: val
});
}
}