
<template name="wxaSortPicker">
    <scroll-view class="wxaSortPickerList" scroll-y="true" style="height: {{wxaSortPickerData.view.scrollHeight}}px;" bindscrolltoupper="wxaSortPickerUpper" bindscrolltolower="wxaSortPickerLower" bindscroll="wxaSortPickerScroll" scroll-into-view="{{wxaSortPickerData.wxaSortPickertoView}}">    
        <block wx:for="{{wxaSortPickerData.textData}}" wx:for-item="item" wx:key="">
            <view id="{{item.tag}}" class="wxaSortPickerTag">{{item.tag}}</view>
            <view class='wxaSortPickerItem-box'>              
              <template is="wxaSortPickerItem" data="{{item,dataType}}"/>
            </view>
        </block>
    </scroll-view>
    <template is="wxaSortPickerTemTags"/>
</template>

<template name="wxaSortPickerItem">  
  <block wx:if='{{dataType == "object"}}'>
    <block wx:for="{{item.textArray}}" wx:for-item="child" wx:key="">
        <view class="wxaSortPickerItem" data-text="{{child.cname}}" data-value="{{child.name}}"  catchtap= "wxaSortPickerItemTap">
          {{child.cname}}       
        </view>
    </block>
  </block>
  <block wx:else>
    <block wx:for="{{item.textArray}}" wx:for-item="child" wx:key="">
        <view class="wxaSortPickerItem" data-text="{{child}}"  catchtap= "wxaSortPickerItemTap">
          {{child}}       
        </view>
    </block>
  </block>
    
</template>

<template name="wxaSortPickerTemTags">
    <scroll-view style="width:20px;height: {{wxaSortPickerData.view.scrollHeight}}px;" class="wxaSortPickerTemTags">
        <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="">
            <view bindtap="wxaSortPickerTemTagTap" data-tag="{{item}}" class="wxaSortPickerTemTag">{{item}}</view>
        </block>
    </scroll-view>
</template>