微信小程序JS
微信小程序之操作三元运算符class
<view class="chejian wx:if='{{item.is_check == 1 ? 'hover' : ''}}' "> 1111</view>
<van-cell-group>
<van-cell title="昵称" value="{{userInfo.nickName}}" />
<van-cell title="性别" value="{{userInfo.gender==1?'男':'女'}}" />
</van-cell-group>
禁用bindtap
<image class='scan' data-index="{{index}}" bindtap='scanCode' src='../images/scanCode.png' mode='widthFix'
class="scan wx:if='{{item.flag == true ? 'eventnone' : ''}}'"></image>