wx:if 以及wx:else判断出现Bad attr `wx的错误
发布于 7 年前 作者 isong 12269 次浏览 来自 问答

这样写有问题吗?会报Bad attr `wx的错误

<view class="first-con">
  <view class='con-title'>余额明细</view>
</view>
<block wx:if='{{total > 0}}' wx:for-items='{{walletList}}' wx:key='{{index}}'>
  <view class="list-box">
    <view class="left">
      <text class="word1">{{item.description}}\t{{item.orderId}}\n</text>
      <text class="word2">{{item.createTime}}</text>
    </view>
    <view class="right blue number" wx:if="{{item.type == 1&&3}}">+{{item.sum}}</view>
    <view class="right red number" wx:else>-{{item.sum}}</view>
  </view>
</block>
<block  wx:else>
  <image src='/common/images/order/noOrder.png' class='no-orderimage'></image>
  <view class='no-ordertext'> 没有搜索到相关数据</view>
</block>
回到顶部