areapicker.wxml 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <t-popup visible="{{ show }}" z-index="{{ 12000 }}" placement="bottom" bind:visible-change="onClose">
  2. <view class="area-picker wr-class" slot="content">
  3. <t-icon t-class="area-picker__close" name="close" prefix="wr" size="40rpx" bindtap="onClose" />
  4. <view class="area-picker__header" wx:if="{{title}}">
  5. <view class="area-picker__header__title">{{title}}</view>
  6. </view>
  7. <view class="area-picker__selected-result">
  8. <view class="area-picker__selected-result__item" wx:for="{{pickerValue}}" wx:for-item="pickedArea" wx:key="index" bindtap="onPickerClick" data-index="{{index}}">
  9. <view class="area-picker__selected-result__item__name">{{pickedArea.name}}</view>
  10. <view class="area-picker__selected-result__item__circle" />
  11. <view class="area-picker__selected-result__item__line" />
  12. </view>
  13. <view class="area-picker__selected-result__item active">
  14. <view class="area-picker__selected-result__item__name">请选择{{columsName[pickerValue.length]}}</view>
  15. <view class="area-picker__selected-result__item__circle" />
  16. </view>
  17. </view>
  18. <view class="area-picker__split-line" />
  19. <view class="area-picker__area-list">
  20. <block wx:if="{{loading}}">
  21. <block wx:if="{{useLoadingSlot}}">
  22. <slot name="loading" />
  23. </block>
  24. <block wx:else>
  25. <t-loading-content class="area-picker__area-list__loading">正在加载</t-loading-content>
  26. </block>
  27. </block>
  28. <block wx:else>
  29. <view class="area-picker__area-list__title">选择{{columsName[pickerValue.length]}}</view>
  30. <view class="area-picker__area-list__content">
  31. <scroll-view class="area-picker__area-list__content__inner" scroll-y scroll-top="{{scrollTop}}">
  32. <view class="area-picker__area-list__content__group" wx:for="{{pickerColumnData}}" wx:for-item="group" wx:for-index="gi" wx:key="gi">
  33. <view class="area-picker__area-list__content__group__title">{{group.name}}</view>
  34. <view class="area-picker__area-list__content__group__content">
  35. <view class="area-picker__area-list__content__group__content__item {{gi === hightLightIndex[0] && index === hightLightIndex[1] ? 'active' : ''}}" hover-class="area-picker__area-list__content__group__content__item__active" id="area-item-{{gi}}-{{index}}" wx:for="{{group.children}}" wx:key="index" bindtap="onChange" data-gi="{{gi}}" data-ai="{{index}}">{{item.name}}
  36. </view>
  37. </view>
  38. </view>
  39. </scroll-view>
  40. </view>
  41. </block>
  42. </view>
  43. </view>
  44. </t-popup>