index.wxml 1.2 KB

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