为什么setData会无效,也不出错
如题:console.log一直输出undefined,但输出e.detail.value又是对的,刚学小程序开发,想不明白 按网上说的 改成 var that = this 也没用
data: {
items: [
{ name: 'wx-auto', value: '记住密码,下次自动登录' },
],
strKHKey:"",
strwxtel:"",
boolwxtelEnabled:false,
strpw:"",
boolpwEnabled:false,
boolAuto:true
},
KHKeyInput:function(e){
this.setData({
strKHKey:e.detail.value
})
console.log("strKHKey:"+this.strKHKey)
},