1.顶部导航优化

master
sws 2024-10-17 18:01:19 +08:00
parent 123ea8e299
commit 3066154e5e
3 changed files with 23 additions and 2 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 = '';

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 = '';

View File

@ -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