微信小程序之操作三元运算符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> 标签:1111,微信,程序,JS,运算符,class From: https://www.cnblogs.com/ZJ0065/p/16725830.html