收藏
回答

小程序加载数据超出dom限制怎么搞?求助大神

框架类型 问题类型 API/组件名称 终端类型 微信版本 基础库版本
小程序 Bug dom 工具 1.0 2.0


数据200条左右

回答关注问题邀请回答
收藏

1 个回答

  • Dante_
    Dante_
    2018-07-02

    贴一下你这里循环的WXML

    2018-07-02
    有用
    回复 2
    • 杨JF
      杨JF
      2018-07-02

      <view class="cartpull">

      <view class="carts-list {{item.isTouchMove ? 'touch-move-active' : ''}}" wx:for="{{carts}}" data-index="{{index}}" bindtouchstart="touchstart" bindtouchmove="touchmove" wx:key="{{carts}}" >

      <view class="carts-item">

      <view class="carts_height" bindtap="selectList" data-index="{{index}}"></view>

      <icon class="item-select" wx:if="{{item.selected}}" type="success" color="#FF5000" bindtap="selectList" data-index="{{index}}" />

      <icon class="item-select" wx:else type="circle" bindtap="selectList" data-index="{{index}}" />

      <view bindtap='goodsDetail' id="{{item.id}}">

      <view class="cart-thumbs">

      <image src="{{config.smGoodsImgUrl}}{{item.pic}}"></image>

      </view>

      </view>

      <view class="cant cants" wx:if='{{item.isShow}}'>购买数量超过最大库存{{item.bulkCount}}{{item.bulkUnits}},无法下单</view>

      <view class="cant cants" wx:if='{{item.isMinShow}}'>购买数量小于起订量{{item.bulkStart}}{{item.bulkUnits}},无法下单</view>

      <view class="column">

      <view class="" bindtap='goodsDetail' id="{{item.id}}">

      <text class="title">{{item.name}}</text>

      <view class="item_right_good_specification">

      <view class="flex">

      <view class="promote-icon" wx:if="{{item.promotionType==1||item.promotionType==2}}">

      <text>促销</text>

      </view>

      <view class="imported imported_bg" wx:if="{{item.persentType!=0}}">满赠</view>

      <view class="imported" wx:if="{{item.importation==1}}">进口</view>

      </view>

      <view class="row">

      <text class="sales" wx:if="{{item.sellType!=2}}">{{item.bulkStart}}{{item.bulkUnits}}起订</text>

      <text class="sales" wx:else>不支持散装订货</text>

      </view>

      </view>

      </view>

      <view class="flex money">

      <view bindtap='goodsDetail' id="{{item.id}}">

      <text class="price" wx:if="{{item.unitsType==2}}">¥{{item.promotionType==0?item.bulkPrice:item.promotionBulkPrice}}<text class="boxs">/{{item.bulkUnits}}</text></text>

      <text class="price" wx:if="{{item.unitsType==1}}">¥{{item.promotionType==0?item.packPrice:item.promotionPackPrice}}<text class="boxs">/{{item.packUnits}}</text></text>


      <view class="graydels" wx:if="{{(item.promotionType==1||item.promotionType==2)&&item.unitsType==2}}">¥{{item.bulkPrice!=null?item.bulkPrice:'?'}}

      <text>/{{item.bulkUnits}}</text>

      </view>

      <view class="graydels" wx:elif="{{(item.promotionType==1||item.promotionType==2)&&item.unitsType==1}}">¥{{item.packPrice!=null?item.packPrice:'?'}}

      <text>/{{item.packUnits}}</text>

      </view>

      </view>

      <view class="stepper">

      <text class="minus" bindtap="minusCount" data-index="{{index}}">-</text>

      <!-- <input class="order-num" type="number" data-index="{{index}}" bindblur="numblur" bindinput="numInput" value="{{item.number}}"></input> -->

      <span class="order-num" data-index="{{index}}" bindblur="numblur">{{item.number}}</span>

      <text class="add" bindtap="addCount" data-index="{{index}}">+</text>

      </view>

      </view>

      </view>

      </view>

      <view data-index="{{index}}" bindtap="deleteList" id="{{item.cartId}}" class="del">删除</view>

      <!-- 底部操作栏 -->

      <view class="carts-footer" wx:if="{{loginStatus}}">

      <view class="cart-foot-left" hidden='{{allSelectt}}'>

      <icon class="item-allselect" wx:if="{{selectAllStatus}}" type="success" color="#FF5000" bindtap="selectAll" />

      <icon class="item-allselect" wx:else type="circle" bindtap="selectAll" />

      <view class="small_text" bindtap="selectAll">全选</view>

      </view>

      <view class="carts-foot">

      <text class="total">合计:</text>

      <text class="prices">¥{{totalPrice}}</text>

      <!-- <text class="species">{{item.price}}件{{item.price}}种</text> -->

      <button class="button-red" bindtap="{{controller==true?'toBuy':''}}" style="{{controller==true?'':'background:#ccc;border:0'}}" formType="submit">结算</button>

      </view>

      </view>

      </view>

      </view>


      2018-07-02
      回复
    • Dante_
      Dante_
      2018-07-02回复杨JF

      没看出什么问题啊,贴到工具里试了下也是正常的。清下缓存试试?

      2018-07-02
      回复
登录 后发表内容