<view wx-if="false">我隐藏了</view>
<view wx-if="true">我隐藏了</view>
>wx:if用来判断
<view wx:if="{{length >19}}">20</view>扒含
<view wx:elif="{{length >16}}">15<让此迹/view>坦并
<view wx:else>0</view>
多个条件:
<丛局view wx:if="{{ !a }}">逻辑非</view>渗知让
<view wx:if="{{ a || b }}">逻辑或</view>
<view wx:if="{{ a &&b }}">逻辑与</view>
1
2
3
wx:if else 的判断
<view wx:if="{{ a >5 }}">6</view>
<view wx:elif="{{ a <5 }}">猛冲4</view>
<view wx:else>5</view>
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)