标签:style div blog boolean 小程序 详解 else 程序 view
1、搭配view
<view wx:if="{{boolean==true}}"> <view class="bg_black"></view> </view> <view wx:elif="{{boolean==false}}"> <view class="bg_red"></view> </view> <view wx:elif> <view class="bg_red"></view> </view>
2、搭配block
<block wx:if="{{boolean==true}}"> <view class="bg_black"></view> </block> <block wx:elif="{{boolean==false}}"> <view class="bg_red"></view> </block> <block wx:else> <view class="bg_red"></view> </block>
【微信小程序】详解wx:if elif else的用法(搭配view、block)
标签:style div blog boolean 小程序 详解 else 程序 view
原文地址:http://www.cnblogs.com/xuzhengzong/p/7121113.html