1、wx-if
>wx-if用来显示和隐藏
<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>
>wx-if用来显示和隐藏
<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>
本文标题:微信小程序中wx-if的用法
本文链接:https://www.haomeiwen.com/subject/bwxfwhtx.html
网友评论