Files
doodle-mini/miniprogram/components3.0/nav-bar/nav-bar.wxml
T
2026-05-25 15:03:43 +08:00

32 lines
1.3 KiB
Plaintext

<view
class="nav-bar"
style="padding-top: {{statusBarHeight}}px; {{background ? 'background:' + background + ';' : ''}}">
<view class="nav-bar__inner" style="height: {{navInnerHeight}}px;">
<view wx:if="{{leftActionType === 'brand'}}" class="nav-bar__brand">
<image
class="nav-bar__logo"
src="/assets/imgs/doodle-logo.png"
mode="aspectFill" />
<text wx:if="{{showBrandName}}" class="nav-bar__brand-name"
>涂鸦丫</text
>
</view>
<view
wx:else
class="nav-bar__back {{leftActionType === 'none' ? 'nav-bar__back--hidden' : ''}}"
bindtap="handleLeftAction">
<text
wx:if="{{leftActionType === 'back'}}"
class="toy-icon toy-icon-arrow-left nav-bar__back-icon"></text>
<text
wx:elif="{{leftActionType === 'home'}}"
class="toy-icon toy-icon-home-o nav-bar__back-icon"></text>
</view>
<text class="nav-bar__title">{{title}}</text>
<view class="nav-bar__right">
<slot name="right"></slot>
</view>
</view>
</view>
<view class="nav-bar__placeholder" style="height: {{navBlockHeight}}px;"></view>