wxSortPickerView.wxml 1.5 KB

123456789101112131415161718192021222324252627
  1. <template name="wxSortPickerView">
  2. <scroll-view class="wxSortPickerViewList" scroll-y="true" style="height: {{wxSortPickerData.view.scrollHeight}}px;" bindscrolltoupper="wxSortPickerViewUpper" bindscrolltolower="wxSortPickerViewLower" bindscroll="wxSortPickerViewScroll" scroll-into-view="{{wxSortPickerData.wxSortPickerViewtoView}}">
  3. <block wx:for="{{wxSortPickerData.textData}}" wx:for-item="item" wx:key="">
  4. <view id="{{item.tag}}" class="wxSortPickerViewTag">{{item.tag}}</view>
  5. <template is="wxSortPickerViewItem" data="{{item}}"/>
  6. </block>
  7. </scroll-view>
  8. <template is="wxSortPickerViewTemTags"/>
  9. </template>
  10. <template name="wxSortPickerViewItem">
  11. <block wx:for="{{item.textArray}}" wx:for-item="child" wx:key="">
  12. <view class="wxSortPickerViewItem" data-text="{{child}}" bindtap = "wxSortPickerViewItemTap">
  13. <text>{{child}}</text>
  14. </view>
  15. </block>
  16. </template>
  17. <template name="wxSortPickerViewTemTags">
  18. <scroll-view style="width:20px;height: {{wxSortPickerData.view.scrollHeight}}px;" class="wxSortPickerViewTemTags">
  19. <block wx:for="{{['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '#']}}" wx:for-item="item" wx:key="">
  20. <view bindtap="wxSortPickerViewTemTagTap" data-tag="{{item}}" class="wxSortPickerViewTemTag">{{item}}</view>
  21. </block>
  22. </scroll-view>
  23. </template>