Commit 9d79e4ef by 李伟康

refactor(watch): 优化客户信息的实时监听

- 将 show 方法改为 show 属性,以实现更准确的监听
- 添加 immediate 选项,确保在数据初始化时也能触发监听
1 parent 88f38faf
......@@ -129,11 +129,14 @@ export default {
if (newval) this.customerInfo = newval
}
},
show (n) {
setTimeout(() => {
if (n && !this.customerInfo.carModel && this.isAito) this.$refs.carBrandListVisible.autoSelect()
}, 1e3)
}
show: {
immediate: true,
handler (n) {
setTimeout(() => {
if (n && !this.customerInfo.carModel && this.isAito) this.$refs.carBrandListVisible.autoSelect()
}, 1e3)
}
},
},
computed: {
watchCustomerInfo () {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!