修改选项卡内容

master
于肖磊 2025-02-28 11:40:28 +08:00
parent ad9c6801f9
commit ea9fc0e184
1 changed files with 6 additions and 7 deletions

View File

@ -184,7 +184,7 @@
if (!Array.isArray(tabs_bg) || tabs_bg.length === 0 || !tabs_bg[0] || !tabs_bg[0].color) {
new_tabs_background = 'background:#fff;';
}
const newPropTop = app.globalData.rpx_to_px(this.propTop);
const newPropTop = this.propIsCommon ? (app.globalData.rpx_to_px(this.propTop) + this.propStickyTop) : (app.globalData.rpx_to_px(this.propTop + this.propStickyTop));
this.setData({
tabs_data: new_tabs_data,
tabs_sliding_fixed_bg: this.propIsCommon ? gradient_computer(new_style.common_style) : this.propTabsSlidingFixedBg,
@ -193,12 +193,11 @@
style_img_container: this.propIsCommon ? common_img_computer(new_style.common_style, this.propIndex) : new_content.tabs_top_up == '1' ? background_computer(new_style.common_style) + padding_computer(this.propSpacingCommonStyle, 1, false) + 'box-sizing: border-box;' : '', //
tabs_top_style: new_tabs_top_style,
// -margin
style_margin_container: this.propIsImmersionModel && this.propNewIsTabsSafeDistance ? `margin-top: -${ newPropTop + this.propStickyTop }px;` : '',
style_margin_container: this.propIsImmersionModel && this.propNewIsTabsSafeDistance ? `margin-top: -${ newPropTop }px;` : '',
//
top_up: new_top_up,
tabs_z_index: 'z-index: 11;'
});
console.log(this.style_img_container);
},
//
get_tabs_height() {
@ -260,10 +259,10 @@
max-width: 100%;
}
}
@media only screen and (min-width: 800px) {
.tabs-contents {
max-width: 800px !important;
}
.tabs-contents {
max-width: 1600rpx !important;
}
@media only screen and (min-width: 1600rpx) {
.tabs-container .tabs-top {
left: calc(50% - 400px) !important;
}