Sanakey
2021-01-31 53cc6f817625897935fb10c3845ad7be400f3036
提交 | 用户 | age
53cc6f 1 <wxs src="../wxs/utils.wxs" module="utils" />
S 2 <wxs src="./index.wxs" module="computed" />
d98d05 3
S 4 <view
5   class="van-picker-column custom-class"
53cc6f 6   style="{{ computed.rootStyle({ itemHeight, visibleItemCount }) }}"
d98d05 7   bind:touchstart="onTouchStart"
S 8   catch:touchmove="onTouchMove"
9   bind:touchend="onTouchEnd"
10   bind:touchcancel="onTouchEnd"
11 >
53cc6f 12   <view style="{{ computed.wrapperStyle({ offset, itemHeight, visibleItemCount }) }}">
d98d05 13     <view
S 14       wx:for="{{ options }}"
15       wx:for-item="option"
16       wx:key="index"
17       data-index="{{ index }}"
18       style="height: {{ itemHeight }}px"
53cc6f 19       class="van-ellipsis {{ utils.bem('picker-column__item', { disabled: option && option.disabled, selected: index === currentIndex }) }} {{ index === currentIndex ? 'active-class' : '' }}"
d98d05 20       bindtap="onClickItem"
53cc6f 21     >{{ computed.optionText(option, valueKey) }}</view>
d98d05 22   </view>
S 23 </view>