涉及到component和Page的区别
Component不会触发onLoad方法。生命周期函数的触发需要依赖lifetimes:
Component({
properties: {
},
data: {
},
lifetimes: {
attached: function(options) {
// 在组件实例进入页面节点树时执行
console.log(options);
}
},
})
涉及到component和Page的区别
Component不会触发onLoad方法。生命周期函数的触发需要依赖lifetimes:
Component({
properties: {
},
data: {
},
lifetimes: {
attached: function(options) {
// 在组件实例进入页面节点树时执行
console.log(options);
}
},
})