recycle-view.wxml 1.7 KB

123456789101112131415161718192021
  1. <!--components/recycle-view/recycle-view.wxml-->
  2. <view bindtouchstart='_beginToScroll' style="height:{{useInPage ? totalHeight + (hasBeforeSlotHeight ? beforeSlotHeight : 0) + (hasAfterSlotHeight ? afterSlotHeight : 0) : height}}px;width:{{width}}px;transform:translateZ(0);-webkit-transform:translateZ(0);" id="content" class="wrap">
  3. <scroll-view bindscroll="_scrollViewDidScroll" class="content" style='height:100%;position: relative;' scroll-y="{{useInPage ? false : scrollY}}" scroll-x="{{false}}" upper-threshold="{{upperThreshold}}" lower-threshold="{{lowerThreshold}}" scroll-top="{{innerScrollTop}}" scroll-into-view="{{innerScrollIntoView}}" scroll-with-animation="{{scrollWithAnimation}}" bindscrolltoupper="_scrollToUpper" bindscrolltolower="_scrollToLower" scroll-anchoring enable-back-to-top="{{enableBackToTop}}" throttle="{{throttle}}">
  4. <view style="position: absolute;z-index:1;width:100%;left: 0;top: 0;opacity: 0;visibility: hidden;">
  5. <slot name="itemsize"></slot>
  6. </view>
  7. <view style="height:{{hasBeforeSlotHeight ? beforeSlotHeight + 'px' : 'auto'}}" class="slot-before">
  8. <slot name="before"></slot>
  9. </view>
  10. <view style='position:relative;width:100%;z-index:10;background: url("{{placeholderImageStr}}") repeat;height:{{totalHeight}}px;'>
  11. <!-- <view class='before' style="height:{{innerBeforeHeight}}px"></view> -->
  12. <view style="position: absolute;left:0;width:100%;top:{{innerBeforeHeight}}px;">
  13. <slot></slot>
  14. </view>
  15. <!-- <view class='after' style="height:{{innerAfterHeight}}px"></view> -->
  16. </view>
  17. <view style="height:{{hasAfterSlotHeight ? afterSlotHeight + 'px' : 'auto'}}" class="slot-after">
  18. <slot name="after"></slot>
  19. </view>
  20. </scroll-view>
  21. </view>