index.wxml 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  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__content">
  8. <view class="van-nav-bar__left" bind:tap="onClickLeft">
  9. <block wx:if="{{ leftArrow || leftText }}">
  10. <van-icon
  11. wx:if="{{ leftArrow }}"
  12. size="16px"
  13. name="arrow-left"
  14. custom-class="van-nav-bar__arrow"
  15. />
  16. <view
  17. wx:if="{{ leftText }}"
  18. class="van-nav-bar__text"
  19. hover-class="van-nav-bar__text--hover"
  20. hover-stay-time="70"
  21. >{{ leftText }}</view>
  22. </block>
  23. <slot wx:else name="left" />
  24. </view>
  25. <view class="van-nav-bar__title title-class van-ellipsis">
  26. <block wx:if="{{ title }}">{{ title }}</block>
  27. <slot wx:else name="title" />
  28. </view>
  29. <view class="van-nav-bar__right" bind:tap="onClickRight">
  30. <view
  31. wx:if="{{ rightText }}"
  32. class="van-nav-bar__text"
  33. hover-class="van-nav-bar__text--hover"
  34. hover-stay-time="70"
  35. >{{ rightText }}</view>
  36. <slot wx:else name="right" />
  37. </view>
  38. </view>
  39. </view>