// watch和data,method,mounted等平级
watch: {
'newshareissueinfofrom.market': {
// 注意:属性值发生变化后,handler执行后获取的 newVal 值和 oldVal 值是一样的
handler (newVal, oldVal) {
if (newVal === '0') {
this.stktypeList = deepCopy(this.stktypeList2);
} else if (newVal === '1') {
this.stktypeList = deepCopy(this.stktypeList2);
} else {
this.stktypeList = deepCopy(this.stktypeList1);
}
},
// 立即处理 进入页面就触发
immediate: true,
// 深度监听 属性的变化
deep: true
}
}