refactor: 统一重构底部导航栏间距逻辑与显示规则
1. 新增全局计算属性统一处理底部导航栏显示判断与间距样式 2. 替换多个页面的手写底部间距逻辑为通用样式 3. 新增路由匹配工具函数,支持灵活配置导航栏显示范围 4. 优化底部导航组件的显示条件判断
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<view :data-theme="themeStyle">
|
||||
<mescroll-uni @getData="getBrandList" ref="mescroll" size="20" :style="brandPageStyle">
|
||||
<mescroll-uni @getData="getBrandList" ref="mescroll" size="20" :style="tabBarPagePaddingStyle">
|
||||
<block slot="list">
|
||||
<ns-adv keyword="NS_BRAND" class-name="adv-wrap"></ns-adv>
|
||||
<view class="brand-content" v-if="brandList.length > 0">
|
||||
@@ -34,13 +34,6 @@ export default {
|
||||
siteId: 0
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
brandPageStyle() {
|
||||
return this.$util.objToStyle({
|
||||
paddingBottom: this.tabBarList && this.tabBarList.list ? '112rpx' : '0'
|
||||
});
|
||||
}
|
||||
},
|
||||
onLoad(options) {
|
||||
if (options.site_id) this.siteId = options.site_id;
|
||||
},
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<mescroll-uni ref="mescroll" top="100" @getData="getMemberCouponList" :style="couponListPageStyle">
|
||||
<mescroll-uni ref="mescroll" top="100" @getData="getMemberCouponList" :style="tabBarPagePaddingStyle">
|
||||
<block slot="list">
|
||||
<view class="coupon-listone">
|
||||
<view class="item" v-for="(item, index) in list" :key="index" @click="liClick(item, index)"
|
||||
@@ -95,13 +95,6 @@ export default {
|
||||
mpShareData: null //小程序分享数据
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
couponListPageStyle() {
|
||||
return this.$util.objToStyle({
|
||||
paddingBottom: this.tabBarList && this.tabBarList.list ? '112rpx' : '0'
|
||||
});
|
||||
}
|
||||
},
|
||||
onLoad(option) {
|
||||
setTimeout(() => {
|
||||
if (!this.addonIsExist.coupon) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<view :style="themeColor">
|
||||
<view class="content" :style="searchPageStyle">
|
||||
<view class="content" :style="tabBarPagePaddingStyle">
|
||||
<view class="cate-search">
|
||||
<view class="search-box" @click="search()" @tap.stop="search()">
|
||||
<input class="uni-input" maxlength="50" v-model="inputValue" confirm-type="search" @focus="inputFocus" focus @confirm="search()" @click="search()" @tap="search()" :placeholder="searchWords ? searchWords : ''" />
|
||||
@@ -62,13 +62,6 @@
|
||||
isAllHistory: false
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
searchPageStyle() {
|
||||
return this.$util.objToStyle({
|
||||
paddingBottom: this.tabBarList && this.tabBarList.list ? '112rpx' : '0'
|
||||
});
|
||||
}
|
||||
},
|
||||
onLoad(options) {
|
||||
if (options.keyword) this.inputValue = options.keyword;
|
||||
uni.getStorageSync('search') ? '' : uni.setStorageSync('search', []);
|
||||
|
||||
Reference in New Issue
Block a user