嵌套的wx:for如何使用?
请教下,在微信小程序中wxml中有以下代码:
< block wx:for = "{{answer_arr}}" > < view class = "tr" > < block wx:for = "{{keyword_arr}}" > < view wx:if = "{{item.key_flag}}" style = "color:#FF00FF" >{{item.alphabet}}</ view > < view wx:else>{{item.alphabet}}</ view > </ block > <!-- <view class='td'>{{item.answer_word}}</view> --> < view class = 'td' >{{item.cor_num}}</ view > </ view > </ block > |
只使用this.setData({answer_arr: this.data.answer_arr});为何keyword_arr没有更新?
请问如何才能让answer_arr和keyword_arr的UI都更新?