From ea9fc0e1848ce5f6315f5f9139a181874e476522 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BA=8E=E8=82=96=E7=A3=8A?= <18851179580@163.com> Date: Fri, 28 Feb 2025 11:40:28 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=80=89=E9=A1=B9=E5=8D=A1?= =?UTF-8?q?=E5=86=85=E5=AE=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/diy/tabs.vue | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/components/diy/tabs.vue b/components/diy/tabs.vue index 1c16fcd3..926299a0 100644 --- a/components/diy/tabs.vue +++ b/components/diy/tabs.vue @@ -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; }