<import-sjs name="computed" from="./index.sjs"/>

<view
  class="adc-picker-column"
  onTouchStart="touchStart"
  catchTouchMove="touchMove"
  onTouchEnd="touchEnd"
  a:if="{{ options.length }}"
>
  <view style="{{ computed.wrapperStyle({ offset, itemHeight, visibleItemCount, duration }) }}">
    <view
      a:for="{{options}}"
      a:for-item="option"
      wx:key="index"
      data-index="{{ index }}"
      style="height: {{ itemHeight }}px;line-height:{{ itemHeight }}px"
      class="adc-ellipsis {{ computed.bem('picker-column__item', { disabled: option && option.disabled, selected: index === currentIndex }) }} {{ index === currentIndex ? 'active-class' : '' }}"
      onTap="onClickItem"
    >
      {{ computed.optionText(option, valueKey) }}
    </view>
  </view>
</view>
