最近在学微信小程序,跟着里面的老师走了一遍。
lifetimes: {
attached:function(){
var that = this;
console.log(that.properties.rate);
}
}
按照这样的代码执行之后,控制台不会显示收到的rate变量。
然后我就比较了下面两段代码:
lifetimes: {
attached:function(){
console.log("123");
}
}
lifetimes: {
attached:
console.log("123")
}
发现下面一段执行,上面一段不执行。这是为啥。
帮帮我这个菜鸟吧!万分感谢!