From af7f2147d181fc04d98db751ec1e8c387cd4ac41 Mon Sep 17 00:00:00 2001 From: sws <1141121512@qq.com> Date: Sat, 28 Sep 2024 19:24:13 +0800 Subject: [PATCH] =?UTF-8?q?1.diy---=E7=BD=AE=E9=A1=B6=E5=BC=80=E5=8F=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/diy/article-tabs.vue | 6 +++++- components/diy/goods-tabs.vue | 6 +++++- components/diy/tabs.vue | 2 +- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/components/diy/article-tabs.vue b/components/diy/article-tabs.vue index 1c5a51b9..dac0fc16 100644 --- a/components/diy/article-tabs.vue +++ b/components/diy/article-tabs.vue @@ -63,8 +63,12 @@ if (tabs_bg.length > 0 && tabs_bg[0].color !== '') { new_tabs_background = gradient_computer(new_style.common_style); } + let new_tabs_background_img = background_computer(new_style.common_style); + if (new_tabs_background_img.length > 0) { + new_tabs_background_img += 'background-position: top left;'; + } this.setData({ - tabs_background: background_computer(new_style.common_style) + (new_tabs_background.length > 0 ? new_tabs_background : 'background:#fff'), + tabs_background: (new_tabs_background.length > 0 ? new_tabs_background : 'background:#fff;') + new_tabs_background_img, }); } else { this.tabs_background = 'background:transparent'; diff --git a/components/diy/goods-tabs.vue b/components/diy/goods-tabs.vue index 2e059c64..4e3f49c3 100644 --- a/components/diy/goods-tabs.vue +++ b/components/diy/goods-tabs.vue @@ -62,8 +62,12 @@ if (tabs_bg.length > 0 && tabs_bg[0].color !== '') { new_tabs_background = gradient_computer(new_style.common_style); } + let new_tabs_background_img = background_computer(new_style.common_style); + if (new_tabs_background_img.length > 0) { + new_tabs_background_img += 'background-position: top left;'; + } this.setData({ - tabs_background: background_computer(new_style.common_style) + (new_tabs_background.length > 0 ? new_tabs_background : 'background:#fff'), + tabs_background: (new_tabs_background.length > 0 ? new_tabs_background : 'background:#fff;') + new_tabs_background_img, }); } else { this.tabs_background = 'background:transparent'; diff --git a/components/diy/tabs.vue b/components/diy/tabs.vue index 5013981f..b2e9e224 100644 --- a/components/diy/tabs.vue +++ b/components/diy/tabs.vue @@ -91,7 +91,7 @@ // 判断选项卡是否置顶 let other_style = 'calc(' + this.propTop + 'px' + ' + 66rpx)'; - let new_tabs_top_style = this.propNavIsTop || this.propTabsIsTop || new_content.tabs_top_up == '1' ? (new_content.tabs_top_up == '1' ? 'top:0;padding-top:' + other_style + ';z-index:3;' : '') : ''; + let new_tabs_top_style = this.propNavIsTop || this.propTabsIsTop || new_content.tabs_top_up == '1' ? (new_content.tabs_top_up == '1' ? 'top:' + other_style + ';z-index:3;' : '') : ''; let new_top_up = new_content.tabs_top_up; // #ifdef H5 || MP-TOUTIAO if (this.propTabsIsTop) {