现在所有的事件都有一问题
发布于 5 年前 作者 oxia 789 次浏览 来自 问答

为什么不支持 事件里面加判断,不能setData   同一个变量  这是为什么有bug  就上次更新了之后就变成这样了,

upload_lawyer_info: function (event) {

var that = this;

if (event.currentTarget.id == 0) {

that.setData({

upload_hidden: 1,

upload_lawyer_info_box_5_bg: “”,

upload_lawyer_info_box_5_bg_l: “upload_lawyer_info_box_5_bg_l”

})

} else if (event.currentTarget.id == 1) {

that.setData({

upload_hidden: 2,

upload_lawyer_info_box_5_bg: “upload_lawyer_info_box_5_bg”,

upload_lawyer_info_box_5_bg_l: “”

})

}

},

1 回复

是在在最新版的开发工具出现这个问题吗?麻烦给个相关的代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html),我们定位下问题

回到顶部