自定义组件 properties observe不触发

发布于 6 年前作者 elong2732 次浏览最后编辑 6 年前来自 ask
properties: {

show : {
type : Boolean,
value : false,
observe : () => {
console.log(123);
}
}
},
ready() {
let that = this;
setTimeout(() => {
console.log('timeout');
that.setData({
show : true
       });
}, 3000);
}

为什么更改了show的值,show属性的observe却没有触发

1 回复
chou
chou1 楼4 年前

observe => observer