微信小程序判断 wx:if wx:else

时间:2019-09-20 12:38:16   收藏:0   阅读:112
<view class="uinfo">
    <text class="sex" wx:if="{{req.sex==1}}">男</text>
    <text wx:else>女</text>
    <image class="sex" wx:if="{{req.sex==1}}" src="/images/person/boy.png"></image>
    <image class="sex" wx:else src="/images/person/girl.png"></image>
</view>
评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!