pull-down-refresh.wxml 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. <wxs src="../common/utils.wxs" module="_" />
  2. <scroll-view
  3. style="{{_._style([style, customStyle, 'max-height: calc(100vh - ' + distanceTop + 'px)'])}}"
  4. class="{{classPrefix}} class {{prefix}}-class"
  5. type="list"
  6. scroll-top="{{scrollTop}}"
  7. scroll-y
  8. enable-back-to-top="{{enableBackToTop}}"
  9. enable-passive="{{enablePassive}}"
  10. lower-threshold="{{lowerThreshold}}"
  11. upper-threshold="{{upperThreshold}}"
  12. scroll-into-view="{{scrollIntoView}}"
  13. show-scrollbar="{{showScrollbar}}"
  14. enhanced
  15. scroll-with-animation
  16. bounces="{{false}}"
  17. bind:touchstart="onTouchStart"
  18. bind:touchmove="onTouchMove"
  19. bind:touchend="onTouchEnd"
  20. bind:scroll="onScroll"
  21. binddragstart="onDragStart"
  22. binddragging="onDragging"
  23. binddragend="onDragEnd"
  24. bindscrolltoupper="onScrollToTop"
  25. bindscrolltolower="onScrollToBottom"
  26. throttle="{{false}}"
  27. >
  28. <slot name="header" />
  29. <view
  30. class="{{classPrefix}}__track {{classPrefix + '__track--' + (loosing ? 'loosing' : '')}}"
  31. style="{{barHeight > 0 ? 'transform: translate3d(0, ' + barHeight + 'px, 0);' : ''}}"
  32. >
  33. <view
  34. class="{{classPrefix}}__tips {{classPrefix + '__tips--' + (loosing ? 'loosing' : '')}}"
  35. style="height: {{tipsHeight}}px"
  36. aria-live="polite"
  37. >
  38. <t-loading
  39. wx:if="{{refreshStatus === 2}}"
  40. delay="{{loadingProps.delay || 0}}"
  41. duration="{{loadingProps.duration || 800}}"
  42. indicator="{{loadingProps.indicator || true}}"
  43. layout="{{loadingProps.layout || 'horizontal'}}"
  44. loading="{{loadingProps.loading || true}}"
  45. pause="{{loadingProps.pause || false}}"
  46. progress="{{loadingProps.progress || 0}}"
  47. reverse="{{loadingProps.reverse || false}}"
  48. size="{{loadingProps.size || '50rpx'}}"
  49. text="{{loadingProps.text || loadingTexts[refreshStatus]}}"
  50. theme="{{loadingProps.theme || 'circular'}}"
  51. t-class-indicator="{{prefix}}-class-indicator"
  52. />
  53. <view wx:elif="{{refreshStatus >= 0}}" class="{{classPrefix}}__text {{prefix}}-class-text"
  54. >{{loadingTexts[refreshStatus]}}</view
  55. >
  56. </view>
  57. <slot />
  58. </view>
  59. </scroll-view>