类似toggleClass
点击给 tit 切换class的
<view class=‘que’ wx:for="{{list}}" wx:key=“z”>
<view class=‘tit {{item.isChose?“dc”:""}}’ data-index=’{{index}}’ bindtap=‘showStatus’ >
{{item.title}}
<text class=‘arrowRight’></text>
</view>
<view class=‘txt’>
<text>{{item.content}}</text>
</view>
</view>
showStatus:function(e){
var index = e.target.dataset.index;
var list = this.data.list
list[index].isChose = !list[index].isChose;
this.setData({
list: list
})
},
请问下,如果不更新list重新渲染,怎么单独的对这块进行处理?