判断路由的路径和当前标签是否相同 的方法

$route (to, from) {
if (to.name == 'infant-birth-registration') {
this.inpatNum = this.$route.params.getVal ? this.$route.params.getVal.inpatNum : ''
if (this.inpatNum != '') {
setTimeout(() => {
this.inpatNumGetData()
}, 100)
}
}
},

原文地址:https://www.cnblogs.com/yn-cn/p/10313592.html