Merge branch 'dev-sws' into dev-yxl

master
于肖磊 2024-10-17 18:05:13 +08:00
commit d0591ee353
5 changed files with 47 additions and 17 deletions

View File

@ -64,11 +64,20 @@
tabs_background: 'background:transparent',
custom_nav_height: 33,
diy_key: '',
// #ifdef MP
nav_safe_space: bar_height + 5,
// #endif
// #ifdef H5 || MP-TOUTIAO
nav_safe_space: bar_height + 7,
// #endif
// #ifdef APP
nav_safe_space: bar_height + 0,
// #endif
};
},
watch: {
propScrollTop(newVal) {
if (newVal + this.propTop + this.custom_nav_height >= this.tabs_top && this.top_up == '1') {
if (newVal + this.propTop + this.custom_nav_height > this.tabs_top + this.nav_safe_space && this.top_up == '1') {
let new_style = this.propValue.style || {};
let tabs_bg = new_style.common_style.color_list;
let new_tabs_background = '';
@ -82,8 +91,12 @@
this.setData({
tabs_background: (new_tabs_background.length > 0 ? new_tabs_background : 'background:#fff;') + new_tabs_background_img,
});
console.log(1);
} else {
this.tabs_background = 'background:transparent';
this.setData({
tabs_background: 'background:transparent',
});
console.log(2);
}
},
propkey(val) {

View File

@ -289,14 +289,15 @@
//
is_header_top: parseInt(this.propValue.header.com_data.style.up_slide_display) == 1 ? true : false,
temp_sticky_top: this.sticky_top,
// temp_header_top: `calc(${this.sticky_top}px + 66rpx + ${parseInt(this.propValue.header.com_data.style.data_alone_row_space || 5) * 2}rpx + ${this.propValue.header.com_data.content.data_alone_row_value.length > 0 ? '66rpx' : '0rpx'});`,
temp_header_top: `calc(${this.sticky_top}px + 66rpx + 40rpx + 66rpx);`,
header_top: `calc(${this.sticky_top}px + 66rpx + 40rpx + 66rpx);`,
temp_header_top: `calc(${this.sticky_top}px + 66rpx + ${parseInt(this.propValue.header.com_data.style.data_alone_row_space || 5) * 2}rpx + ${this.propValue.header.com_data.content.data_alone_row_value.length > 0 ? '66rpx' : '0rpx'});`,
header_top: `calc(${this.sticky_top}px + 66rpx + ${parseInt(this.propValue.header.com_data.style.data_alone_row_space || 5) * 2}rpx + ${this.propValue.header.com_data.content.data_alone_row_value.length > 0 ? '66rpx' : '0rpx'});`,
// temp_header_top: `calc(${this.sticky_top}px + 66rpx + 40rpx + 66rpx);`,
// header_top: `calc(${this.sticky_top}px + 66rpx + 40rpx + 66rpx);`,
// --------------------------------------------------
// is_search_alone_row: this.propValue.header.com_data.content.data_alone_row_value.length > 0 ? true : false,
// data_alone_row_space: parseInt(this.propValue.header.com_data.style.data_alone_row_space || 5),
is_search_alone_row: true,
data_alone_row_space: 20,
is_search_alone_row: this.propValue.header.com_data.content.data_alone_row_value.length > 0 ? true : false,
data_alone_row_space: parseInt(this.propValue.header.com_data.style.data_alone_row_space || 5),
// is_search_alone_row: true,
// data_alone_row_space: 20,
});
//

View File

@ -67,11 +67,20 @@
tabs_background: 'background:transparent',
custom_nav_height: 33,
diy_key: '',
// #ifdef MP
nav_safe_space: bar_height + 5,
// #endif
// #ifdef H5 || MP-TOUTIAO
nav_safe_space: bar_height + 7,
// #endif
// #ifdef APP
nav_safe_space: bar_height + 0,
// #endif
};
},
watch: {
propScrollTop(newVal) {
if (newVal + this.propTop + this.custom_nav_height >= this.tabs_top && this.top_up == '1') {
if (newVal + this.propTop + this.custom_nav_height > this.tabs_top + this.nav_safe_space && this.top_up == '1') {
let new_style = this.propValue.style || {};
let tabs_bg = new_style.common_style.color_list;
let new_tabs_background = '';
@ -86,7 +95,9 @@
tabs_background: (new_tabs_background.length > 0 ? new_tabs_background : 'background:#fff;') + new_tabs_background_img,
});
} else {
this.tabs_background = 'background:transparent';
this.setData({
tabs_background: 'background:transparent',
});
}
},
propkey(val) {

View File

@ -9,7 +9,7 @@
<view class="header-content flex-row align-s">
<view class="model-top flex-1 mt-1">
<view class="roll pr z-i">
<view class="model-head pr padding-left-main padding-right-main" style="box-sizing:border-box;">
<view class="model-head pr padding-left-main padding-right-main" style="box-sizing: border-box">
<view class="flex-col" :style="'gap:' + form.style.data_alone_row_space * 2 + 'rpx;'">
<view class="model-head-content flex-row align-c jc-sb gap-16 wh-auto pr" :style="header_style">
<view v-if="!is_tabbar_pages" class="z-i dis-inline-block margin-top-xs" @tap="top_nav_left_back_event">
@ -72,13 +72,13 @@
</view>
<block v-if="!is_immersion_model">
<view v-if="!is_positon_realative" class="nav-seat" :style="top_content_style">
<view style="height: 66rpx"></view>
<view :style="'height:' + (is_search_alone_row || is_icon_alone_row ? 'calc(132rpx + ' + data_alone_row_space * 2 + 'rpx);' : '66rpx;')"></view>
</view>
</block>
<!-- #ifndef H5 || MP-TOUTIAO -->
<view v-if="is_positon_realative" class="wh-auto pf top-0 left-0 right-0" :style="roll_style">
<view :style="top_content_style">
<view style="height: 66rpx"></view>
<view :style="'height:' + (is_search_alone_row || is_icon_alone_row ? 'calc(132rpx + ' + data_alone_row_space * 2 + 'rpx);' : '66rpx;')"></view>
</view>
</view>
<!-- #endif -->
@ -125,6 +125,7 @@
text_style: '',
header_style: 'max-width:100%',
common_app_is_header_nav_fixed: 0,
// 5,7,0 12 66bar_height
// #ifdef MP
top_content_style: 'padding-top:' + (bar_height + 5) + 'px;padding-bottom:12px;',
// #endif
@ -138,9 +139,11 @@
//
header_background_type: 'color_image',
// #ifdef MP
sticky_top: bar_height + 5,
header_top: bar_height + 5 + 12 + 33,
// #endif
// #ifdef H5 || MP-TOUTIAO
sticky_top: bar_height + 7 + 12,
header_top: bar_height + 7 + 12 + 33,
// #endif
// #ifdef APP
@ -155,6 +158,7 @@
// header
is_search_alone_row: false,
is_icon_alone_row: false,
data_alone_row_space: 0,
};
},
watch: {
@ -218,8 +222,9 @@
header_style: menu_button_info,
header_background_type: header_background_type,
is_immersion_model: header_background_type !== 'color_image' && immersive_style == '1',
data_alone_row_space: new_style.data_alone_row_space,
is_search_alone_row: new_content.data_alone_row_value && new_content.data_alone_row_value.includes('search'),
is_icon_alone_row: new_content.data_alone_row_value && new_content.data_alone_row_value.includes('icon')
is_icon_alone_row: new_content.data_alone_row_value && new_content.data_alone_row_value.includes('icon'),
});
this.$emit('immersion-model-call-back', this.is_immersion_model);
},

View File

@ -29,8 +29,8 @@
},
//
propTop: {
type: Number,
default: 0,
type: String,
default: '0',
},
//
propNavIsTop: {