refactor: 统一重构底部导航栏间距逻辑与显示规则
1. 新增全局计算属性统一处理底部导航栏显示判断与间距样式 2. 替换多个页面的手写底部间距逻辑为通用样式 3. 新增路由匹配工具函数,支持灵活配置导航栏显示范围 4. 优化底部导航组件的显示条件判断
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<view class="content" :style="themeColor">
|
||||
<mescroll-uni ref="mescroll" @getData="getGoodsList" :style="fenxiaoGoodsListPageStyle">
|
||||
<mescroll-uni ref="mescroll" @getData="getGoodsList" :style="tabBarPagePaddingStyle">
|
||||
<block slot="list">
|
||||
<view class="goods-list"
|
||||
:style="{ backgroundImage: 'url(' + $util.img('public/uniapp/fenxiao/promote/promote_bg.png') + ')' }">
|
||||
@@ -139,14 +139,7 @@ import list from './public/js/goods_list.js';
|
||||
import fenxiaoWords from 'common/js/fenxiao-words.js';
|
||||
|
||||
export default {
|
||||
mixins: [list, fenxiaoWords],
|
||||
computed: {
|
||||
fenxiaoGoodsListPageStyle() {
|
||||
return this.$util.objToStyle({
|
||||
paddingBottom: this.tabBarList && this.tabBarList.list ? '112rpx' : '0'
|
||||
});
|
||||
}
|
||||
}
|
||||
mixins: [list, fenxiaoWords]
|
||||
};
|
||||
</script>
|
||||
|
||||
|
||||
@@ -581,7 +581,7 @@ export default {
|
||||
},
|
||||
fenxiaoIndexPageStyle() {
|
||||
const style = {
|
||||
paddingBottom: this.tabBarList && this.tabBarList.list ? '112rpx' : '0'
|
||||
...this.tabBarPaddingStyleValue
|
||||
};
|
||||
if (this.$util && this.$util.img) {
|
||||
style.background = 'url(' + this.$util.img('public/uniapp/fenxiao/index/commissionFission-background.png') + ')';
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
<mescroll-uni ref="mescroll" @getData="getData" top="90" class="member-point" :size="8" v-if="storeToken" :style="fenxiaoOrderPageStyle">
|
||||
<mescroll-uni ref="mescroll" @getData="getData" top="90" class="member-point" :size="8" v-if="storeToken" :style="tabBarPagePaddingStyle">
|
||||
<view class="goods_list" slot="list">
|
||||
<view class="order-list">
|
||||
<view class="order-item" v-for="(orderItem, orderIndex) in orderList" :key="orderIndex"
|
||||
@@ -134,13 +134,6 @@ export default {
|
||||
subMemberId: ''
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
fenxiaoOrderPageStyle() {
|
||||
return this.$util.objToStyle({
|
||||
paddingBottom: this.tabBarList && this.tabBarList.list ? '112rpx' : '0'
|
||||
});
|
||||
}
|
||||
},
|
||||
mixins: [fenxiaoWords],
|
||||
onLoad(option) {
|
||||
if (option.type != undefined) this.selectId = option.type;
|
||||
|
||||
Reference in New Issue
Block a user