微信小程序—wx:if elif else的用法(搭配view、block)

    xiaoxiao2023-11-08  159

    <view wx:if="{{boolean==true}}"> <view class="bg_black"></view> </view> <view wx:elif="{{boolean==false}}"> <view class="bg_red"></view> </view> <view wx:else> <view class="bg_red"></view> </view> <block wx:if="{{city!='' && boolean==true}}"> <text class="bg_red">{{city}}</text> <button class="submit_button" bindtap="submit_answer" data-idx="">下一步</button> </block> <block wx:elif="{{address!='' || boolean==false}}"> <view class="bg_red"></view> <textarea bindinput="textareaInput" maxlength="-1" style="height: 4em" name="address" value="{{address}}"/> </block> <block wx:else> <view class="bg_red"></view> <button class="submit_button" bindtap="submit_answer" disabled='disabled'>下一步</button> </block>

    https://www.cnblogs.com/panlaixing/p/6552637.html

    最新回复(0)