微信小程序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>
posted @ 2022-09-24 16:05  青衣跪下  阅读(60)  评论(0编辑  收藏  举报