link.wxml 1.7 KB

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