1.顶部导航优化
parent
123ea8e299
commit
3066154e5e
|
|
@ -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 = '';
|
||||
|
|
|
|||
|
|
@ -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 = '';
|
||||
|
|
|
|||
|
|
@ -125,6 +125,7 @@
|
|||
text_style: '',
|
||||
header_style: 'max-width:100%',
|
||||
common_app_is_header_nav_fixed: 0,
|
||||
// 5,7,0 是误差,, 12 是下边距,66是高度,bar_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
|
||||
|
|
|
|||
Loading…
Reference in New Issue