methods: {
//点击菜单路由跳转
clickMenu (item) {
//当页面路由与点击后要跳转的路由不一致才允许跳转,且不是重定向情况
if (this.$route.path !== item.path && !(this.$route.path === '/home' && (item.path === '/'))) {
this.$router.push(item.path)
}
}
},
vue中路由点击两次报错问题,加个判断
猜你喜欢
转载自blog.csdn.net/m0_63229791/article/details/134799380
今日推荐
周排行