index.wxml 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. <wxs src="../wxs/utils.wxs" module="utils" />
  2. <view wx:if="{{ fixed && placeholder }}" style="height: {{ height }}px;" />
  3. <view
  4. class="{{ utils.bem('nav-bar', { fixed }) }} custom-class {{ border ? 'van-hairline--bottom' : '' }}"
  5. style="{{ baseStyle }} {{ customStyle }}"
  6. >
  7. <view class="van-nav-bar__left" bind:tap="onClickLeft">
  8. <block wx:if="{{ leftArrow || leftText }}">
  9. <van-icon
  10. wx:if="{{ leftArrow }}"
  11. size="16px"
  12. name="arrow-left"
  13. custom-class="van-nav-bar__arrow"
  14. />
  15. <view
  16. wx:if="{{ leftText }}"
  17. class="van-nav-bar__text"
  18. hover-class="van-nav-bar__text--hover"
  19. hover-stay-time="70"
  20. >{{ leftText }}</view>
  21. </block>
  22. <slot wx:else name="left" />
  23. </view>
  24. <view class="van-nav-bar__title title-class van-ellipsis">
  25. <block wx:if="{{ title }}">{{ title }}</block>
  26. <slot wx:else name="title" />
  27. </view>
  28. <view class="van-nav-bar__right" bind:tap="onClickRight">
  29. <view
  30. wx:if="{{ rightText }}"
  31. class="van-nav-bar__text"
  32. hover-class="van-nav-bar__text--hover"
  33. hover-stay-time="70"
  34. >{{ rightText }}</view>
  35. <slot wx:else name="right" />
  36. </view>
  37. </view>