1111
This commit is contained in:
@@ -23,7 +23,7 @@
|
|||||||
|
|
||||||
<!-- 居中布局 -->
|
<!-- 居中布局 -->
|
||||||
<!-- ②这里不使用props改用data -->
|
<!-- ②这里不使用props改用data -->
|
||||||
<view v-if="navStyle==='center'" class="_navLayout"
|
<view v-if="navStyle==='center'&&supportCustomBar" class="_navLayout"
|
||||||
:style="{'background': navBackground,'height':navStatusHeight}">
|
:style="{'background': navBackground,'height':navStatusHeight}">
|
||||||
<!-- 状态栏 -->
|
<!-- 状态栏 -->
|
||||||
<view :style="{'height':statusBarHeight}"></view>
|
<view :style="{'height':statusBarHeight}"></view>
|
||||||
@@ -31,17 +31,21 @@
|
|||||||
<view class="_nav-real" :style="{'height':navHeight,'width':enableWidth}">
|
<view class="_nav-real" :style="{'height':navHeight,'width':enableWidth}">
|
||||||
<!-- 按键区域,占用为不可用的宽度 -->
|
<!-- 按键区域,占用为不可用的宽度 -->
|
||||||
<view class="_navIcon" :style="{'width':disableWidth,'height':navHeight}">
|
<view class="_navIcon" :style="{'width':disableWidth,'height':navHeight}">
|
||||||
<image v-if="!nativeNavNoRemove&&showIcon" src="../../static/wx_back.png"
|
<image v-if="showIcon" src="../../static/wx_back.png" style="width: 23px;height: 23px;"
|
||||||
style="width: 23px;height: 23px;" @click="clickIcon"></image>
|
@click="clickIcon"></image>
|
||||||
</view>
|
</view>
|
||||||
<!-- 标题布局 -->
|
<!-- 标题布局 -->
|
||||||
<view class="_nav-title" :style="{'height':navHeight,'line-height':navHeight,'font-size':fontSize}">
|
<view class="_nav-title" :style="{'height':navHeight,'line-height':navHeight,'font-size':fontSize}">
|
||||||
{{nativeNavNoRemove?"":navTitle}}
|
{{navTitle}}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
<!-- 占位的前提,必须支持自定义导航栏 -->
|
||||||
|
<view v-if="supportCustomBar">
|
||||||
<view v-if="!supportChange" :style="{'height':navStatusHeight}"></view>
|
<view v-if="!supportChange" :style="{'height':navStatusHeight}"></view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
@@ -103,7 +107,7 @@
|
|||||||
enableWidth: 0,
|
enableWidth: 0,
|
||||||
fontSize: 0,
|
fontSize: 0,
|
||||||
navStyle: 'left',
|
navStyle: 'left',
|
||||||
nativeNavNoRemove: true,
|
supportCustomBar: true,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
@@ -130,7 +134,7 @@
|
|||||||
this.disableWidth = navInfo.navBar.disableWidth + navInfo.unit
|
this.disableWidth = navInfo.navBar.disableWidth + navInfo.unit
|
||||||
this.enableWidth = navInfo.navBar.enableWidth + navInfo.unit
|
this.enableWidth = navInfo.navBar.enableWidth + navInfo.unit
|
||||||
this.fontSize = navInfo.navBar.fontSize + navInfo.unit
|
this.fontSize = navInfo.navBar.fontSize + navInfo.unit
|
||||||
this.nativeNavNoRemove = navInfo.menuButton.nativeNavNoRemove
|
this.supportCustomBar = navInfo.supportCustomBar
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user