Browse Source

1111

master
wangjiahai 2 years ago
parent
commit
d6633c9461
  1. 18
      components/NavBar/NavBar.vue

18
components/NavBar/NavBar.vue

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

Loading…
Cancel
Save