正常这里的type应该已经更新为“户型图”了
但页面数据还是“厨房”
求大佬们指教啊!
使用this.setData后,数据更新成功,但是页面数据不更新?这是为什么?After using this.setData, the data is updated successfully, but the page data is not updated? why is that?
使用this.setData后,数据更新成功,但是页面数据不更新?这是为什么?正常这里的type应该已经更新为“户型图”了
但页面数据还是“厨房”
求大佬们指教啊!
Normally, the type here should have been updated to "house type map", but the page data is still "kitchen". Please ask the leaders for advice!
回答:
跟this指向没关系,应该就是for循环的问题,你在循环外打印一下就知道了
for循环并未终止吧,目测逻辑有问题
this 指向有问题
你for循环的对象没有重新赋值