back-top.wxml 570 B

12345678910111213141516
  1. <import src="../common/template/icon.wxml" />
  2. <wxs src="../common/utils.wxs" module="_" />
  3. <view
  4. style="{{_._style([style, customStyle])}}"
  5. class="{{prefix}}-class {{_.cls(classPrefix, [['fixed', fixed], theme])}}"
  6. bindtap="toTop"
  7. aria-role="button"
  8. >
  9. <view class="{{classPrefix}}__icon" aria-hidden>
  10. <slot name="icon" />
  11. <template wx:if="{{_icon}}" is="icon" data="{{tClass: prefix + '-class-icon', ..._icon }}" />
  12. </view>
  13. <view wx:if="{{!!text}}" class="{{classPrefix}}__text--{{theme}} {{prefix}}-class-text">{{text}}</view>
  14. <slot />
  15. </view>