picker-item.wxml 752 B

123456789101112131415161718192021222324
  1. <wxs src="../common/utils.wxs" module="_" />
  2. <view
  3. style="{{ customStyle }}"
  4. class="{{_.cls(classPrefix + '__group', [['narrow', siblingCount > 4], ['roomy', siblingCount <= 2]])}}"
  5. bind:touchstart="onTouchStart"
  6. catch:touchmove="onTouchMove"
  7. bind:touchend="onTouchEnd"
  8. bind:touchcancel="onTouchEnd"
  9. >
  10. <view
  11. class="{{classPrefix}}__wrapper"
  12. style="transition: transform {{ duration }}ms cubic-bezier(0.215, 0.61, 0.355, 1); transform: translate3d(0, {{ offset }}px, 0)"
  13. >
  14. <view
  15. class="{{_.cls(classPrefix + '__item', [['active', curIndex == index]])}}"
  16. wx:for="{{options}}"
  17. wx:key="index"
  18. wx:for-item="option"
  19. data-index="{{ index }}"
  20. >
  21. {{option.label}}
  22. </view>
  23. </view>
  24. </view>