收藏
回答

双层 wx:for嵌套无效 无法显示?

  <block wx:for='{{houses}}' wx:for-index="idx" wx:key="item">                  //第一层
  <block wx:if="{{item.status=='待租' || showRent==1 }}">
    <view class="container" data-id="{{item.id}}">
      <view class='container-content'>
        <view class='user-info'>
          <view class='user-name-time'>
            <view class='user-name'>{{item.ads}}</view>
          </view>
        </view>
        <view class='content'>
          <text class='content-text'>最大房客数:{{item.maxg}}</text>
          <text class="content-text">
        <text wx:if="{{item.status=='待租'}}" class="font-nrented">{{item.status}}</text>
          <text wx:else class="font-rented">{{item.status}}</text>
          <view wx:for="{{[1,2,3,4]}}">123</view>                    //第二层,预览中无法显示
          <text class='font-type'> {{item.type}}</text></text>
          <view class='user-publish-time'>{{item.rent}} <text class="font-rent-unit">元/月</text></view>
        </view>
      </view>
    </view>
    <view class='container-line'></view>
  </block>
</block>
最后一次编辑于  2020-04-22
回答关注问题邀请回答
收藏

2 个回答

登录 后发表内容
问题标签