-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnavBar.wxml
42 lines (42 loc) · 2.41 KB
/
navBar.wxml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<view class="lxy-nav-bar {{extClass}}" style="background: {{background}};height: {{navBarHeight+ navBarExtendHeight}}px;">
<view class="lxy-nav-bar__placeholder {{ios ? 'ios' : 'android'}}" style="padding-top: {{navBarHeight+ navBarExtendHeight}}px;visibility: hidden;"></view>
<view class="lxy-nav-bar__inner {{ios ? 'ios' : 'android'}}" style="{{navigationbarinnerStyle}}{{displayStyle}}">
<image wx:if="{{navBg}}" class="ui-navBg" src="{{navBg}}" style="height: {{navBarHeight+ navBarExtendHeight}}px;" mode="widthFit"></image>
<view class='lxy-nav-bar__left' style="{{navBarLeft}}">
<block wx:if="{{back&&!home}}">
<view bindtap="back" class="lxy-nav-bar__button lxy-nav-bar__btn_goback {{iconTheme}}"></view>
</block>
<block wx:if="{{!back&&home}}">
<view bindtap="home" class="lxy-nav-bar__button lxy-nav-bar__btn_gohome {{iconTheme}}"></view>
</block>
<block wx:elif="{{back&&home}}">
<view class="lxy-nav-bar__buttons {{ios ? 'ios' : 'android'}}" wx:if="{{home}}">
<view bindtap="back" class="lxy-nav-bar__button lxy-nav-bar__btn_goback {{iconTheme}}" wx:if="{{back}}"></view>
<view bindtap="home" class="lxy-nav-bar__button lxy-nav-bar__btn_gohome {{iconTheme}}"></view>
</view>
</block>
<block wx:else>
<slot name="left"></slot>
</block>
</view>
<view class='lxy-nav-bar__center'>
<block wx:if="{{title}}">
<text>{{title}}</text>
</block>
<view class='lxy-nav-bar-search' style="height:{{capsulePosition.height}}px;" wx:elif="{{searchBar}}" bindtap="search">
<view class='lxy-nav-bar-search__icon' />
<view class='lxy-nav-bar-search__input'>{{searchText}}</view>
</view>
<!-- 暂时不开发标题loading. 看后期需要 -->
<!-- <view wx:if="{{loading}}" class="lxy-nav-bar__loading">
<view class="lxy-loading" style="width:{{size.width}}rpx;height:{{size.height}}rpx;"></view>
</view> -->
<block wx:else>
<slot name="center"></slot>
</block>
</view>
<view class='lxy-nav-bar__right'>
<slot name="right"></slot>
</view>
</view>
</view>