多个条件:
<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>
多个条件:
<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>