index.wxml 1.3 KB

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