indexes.wxml 980 B

12345678910111213141516171819202122232425262728
  1. <wxs src="../common/utils.wxs" module="_" />
  2. <wxs src="./indexes.wxs" module="_this" />
  3. <view style="{{_._style([style, customStyle])}}" class="{{classPrefix}} class {{prefix}}-class">
  4. <view
  5. class="{{classPrefix}}__sidebar {{prefix}}-class-sidebar"
  6. id="id-{{classPrefix}}__bar"
  7. catch:touchmove="onTouchMove"
  8. catch:touchcancel="onTouchCancel"
  9. catch:touchend="onTouchEnd"
  10. >
  11. <view
  12. class="{{_.cls(classPrefix + '__sidebar-item', [['active', activeAnchor === item]])}} {{prefix}}-class-sidebar-item"
  13. wx:for="{{ _indexList }}"
  14. wx:key="*this"
  15. bind:tap="onClick"
  16. data-index="{{index}}"
  17. >
  18. <view aria-role="button" aria-label="{{ activeAnchor === item ? '已选中' + item : ''}}">
  19. {{ _this.getFirstCharacter(item) }}
  20. </view>
  21. <view class="{{classPrefix}}__sidebar-tips" wx:if="{{ showTips && activeAnchor === item }}">
  22. {{ activeAnchor }}
  23. </view>
  24. </view>
  25. </view>
  26. <slot />
  27. </view>