picker-item.wxml 884 B

123456789101112131415161718192021222324252627
  1. <wxs src="../common/utils.wxs" module="_" />
  2. <view
  3. style="{{_._style([style, customStyle])}}"
  4. class="{{_.cls(classPrefix + '__group', [])}} class {{prefix}}-class"
  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. style="height: {{pickItemHeight}}px"
  17. wx:for="{{options}}"
  18. wx:key="index"
  19. wx:for-item="option"
  20. data-index="{{ index }}"
  21. >
  22. <text class="{{classPrefix}}__item-label">{{option[labelAlias]}}</text>
  23. <slot name="label-suffix--{{index}}"></slot>
  24. </view>
  25. </view>
  26. </view>