条件渲染如何添加变量
- 我需要根据条件动态改变view的样式?如:
<view wx:if="{{index == select_index}}" class=‘tr bg-g’ bindtap=‘select_data’ style =‘background-color:{{select_color}}’ id=’{{index}}’>
- 能否实现index==select_index这样的变量判断?
<view wx:if="{{index == select_index}}" class=‘tr bg-g’ bindtap=‘select_data’ style =‘background-color:{{select_color}}’ id=’{{index}}’>