index.wxml 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <scroll-view class="page page-select-index"
  2. style="height: {{windowHeight}}px;"
  3. enable-back-to-top
  4. scroll-into-view="{{intoView}}"
  5. scroll-y
  6. bindscroll="onScroll">
  7. <view>
  8. <slot></slot>
  9. </view>
  10. <view class="index_list_item"
  11. wx:for="{{list}}"
  12. wx:key="alpha"
  13. id="{{item.alpha}}">
  14. <view class="index-group__title">{{item.alpha}}</view>
  15. <view class="index-group__content">
  16. <view class="index-group__list">
  17. <block wx:for="{{item.subItems}}" wx:for-item="subItem" wx:key="name">
  18. <view class="index-group__item thin-border-bottom"
  19. hover-class="bg-highlight"
  20. data-item="{{subItem}}"
  21. bindtap="choose">{{subItem.name}}
  22. </view>
  23. </block>
  24. </view>
  25. </view>
  26. </view>
  27. </scroll-view>
  28. <view class="anchor-bar__wrp wx-flex"
  29. catchtouchstart='scrollTo'
  30. catchtouchmove='scrollTo'
  31. catchtouchend='removeTouching'>
  32. <view class="anchor-bar wx-flex__item">
  33. <view class="anchor-list">
  34. <block wx:for="{{alphabet}}" wx:key="*this" wx:for-item="alpha">
  35. <view class="anchor-item {{current == alpha ? ( touching ? 'selected tapped' : 'selected' ): ''}}"
  36. data-alpha="{{alpha}}">
  37. <view class="anchor-item__inner">{{alpha}}</view>
  38. <view class="anchor-item__pop">{{alpha}}</view>
  39. </view>
  40. </block>
  41. </view>
  42. </view>
  43. </view>