link.wxml 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <import src="../common/template/icon.wxml" />
  2. <wxs src="../common/utils.wxs" module="_" />
  3. <navigator
  4. class="{{className}} {{prefix}}-class"
  5. style="{{_._style([style, customStyle])}}"
  6. target="{{navigatorProps.target}}"
  7. url="{{navigatorProps.url}}"
  8. open-type="{{navigatorProps.openType || 'navigate'}}"
  9. delta="{{navigatorProps.delta}}"
  10. app-id="{{navigatorProps.appId}}"
  11. path="{{navigatorProps.path}}"
  12. extra-data="{{navigatorProps.extraData}}"
  13. version="{{navigatorProps.version}}"
  14. short-link="{{navigatorProps.shortLink}}"
  15. hover-class="none {{navigatorProps.hoverClass}}"
  16. hover-stop-propagation="navigatorProps.hoverStopPropagation"
  17. hover-start-time="{{navigatorProps.hoverStartTime}}"
  18. hover-stay-time="{{navigatorProps.hoverStayTime}}"
  19. bindsuccess="onSuccess"
  20. bindfail="onFail"
  21. bindcomplete="onComplete"
  22. aria-disabled="{{status === 'disabled'}}"
  23. >
  24. <view class="{{classPrefix}}__prefix-icon">
  25. <slot name="prefix-icon" />
  26. <template
  27. wx:if="{{_prefixIcon}}"
  28. is="icon"
  29. data="{{tClass: prefix + '-class-prefix-icon', ariaHidden: true, ..._prefixIcon }}"
  30. />
  31. </view>
  32. <view class="{{classPrefix}}__content {{prefix}}-class-content">
  33. <block wx:if="{{content}}">{{content}}</block>
  34. <slot name="content" />
  35. </view>
  36. <view class="{{classPrefix}}__suffix-icon">
  37. <slot name="suffix-icon" />
  38. <template
  39. wx:if="{{_suffixIcon}}"
  40. is="icon"
  41. data="{{tClass: prefix + '-class-suffix-icon', ariaHidden: true, ..._suffixIcon }}"
  42. />
  43. </view>
  44. </navigator>