From c4746232cd5b3554c0d689be4ba1f91515c14150 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BA=8E=E8=82=96=E7=A3=8A?= <18851179580@163.com> Date: Mon, 10 Feb 2025 13:58:56 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=80=89=E9=A1=B9=E5=8D=A1?= =?UTF-8?q?=E7=9A=84=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/diy/article-tabs.vue | 7 +------ components/diy/data-tabs.vue | 7 +------ components/diy/diy.vue | 2 +- components/diy/goods-tabs.vue | 7 +------ 4 files changed, 4 insertions(+), 19 deletions(-) diff --git a/components/diy/article-tabs.vue b/components/diy/article-tabs.vue index 343d0428..b1de9e48 100644 --- a/components/diy/article-tabs.vue +++ b/components/diy/article-tabs.vue @@ -116,12 +116,6 @@ this.tabs_background = 'background:transparent'; } }, - propTop(val) { - let new_style = this.propValue.style || {}; - this.setData({ - sticky_top: val + (new_style?.tabs_margin?.margin_top || 0), - }); - }, propKey(val) { this.setData({ diy_key: val, @@ -199,6 +193,7 @@ const tabs_content = new_style?.tabs_content || old_border_and_box_shadow; this.setData({ top_up: new_content.tabs_top_up, + sticky_top: this.propTop + (new_style?.tabs_margin?.margin_top || 0), article_tabs: new_data, style_container: common_styles_computer(common_style), style_img_container: common_img_computer(common_style, this.propIndex), diff --git a/components/diy/data-tabs.vue b/components/diy/data-tabs.vue index d5c00956..f2193f00 100644 --- a/components/diy/data-tabs.vue +++ b/components/diy/data-tabs.vue @@ -179,12 +179,6 @@ this.tabs_background = 'background:transparent'; } }, - propTop(val) { - let new_style = this.propValue.style || {}; - this.setData({ - sticky_top: val + (new_style?.tabs_margin?.margin_top || 0), - }); - }, propKey(val) { // 初始化 this.setData({ @@ -251,6 +245,7 @@ this.tabs_click_event(0); this.setData({ top_up: new_content.tabs_top_up, + sticky_top: this.propTop + (new_style?.tabs_margin?.margin_top || 0), data_tabs: new_data, // 自定义需要做等比缩放,因此宽度需要减去 外层通用的宽度和内容区域的宽度 outer_container_width: common_style.margin_left + common_style.margin_right + common_style.padding_left + common_style.padding_right + new_style.data_content_margin.margin_left + new_style.data_content_margin.margin_right + new_style.data_content_padding.padding_left + new_style.data_content_padding.padding_right, diff --git a/components/diy/diy.vue b/components/diy/diy.vue index 61f503b5..ec27d960 100644 --- a/components/diy/diy.vue +++ b/components/diy/diy.vue @@ -353,7 +353,7 @@ is_search_alone_row: header.com_data.content.data_alone_row_value.length > 0 ? true : false, data_alone_row_space: parseInt(header.com_data.style.data_alone_row_space || 5), is_immersive_style_and_general_safe_distance_value: header_style.immersive_style == '1' && header_style.general_safe_distance_value == '1', - is_the_safe_distance_enabled: header_style.immersive_style == '1' && header_style.general_safe_distance_value == '1' && tabs_data.length == 0,// diy_data是否开启安全距离 + is_the_safe_distance_enabled: header_style.immersive_style == '1' && header_style.general_safe_distance_value == '1' && new_tabs_data.length == 0,// diy_data是否开启安全距离 }); // 缓存数据 uni.setStorageSync(this.cache_key + this.tabs_home_id, diy_data); diff --git a/components/diy/goods-tabs.vue b/components/diy/goods-tabs.vue index 41ceb9ad..e2986862 100644 --- a/components/diy/goods-tabs.vue +++ b/components/diy/goods-tabs.vue @@ -114,12 +114,6 @@ this.tabs_background = 'background:transparent'; } }, - propTop(val) { - let new_style = this.propValue.style || {}; - this.setData({ - sticky_top: val + (new_style?.tabs_margin?.margin_top || 0), - }); - }, propKey(val) { // 初始化 this.setData({ @@ -192,6 +186,7 @@ const tabs_content = new_style?.tabs_content || old_border_and_box_shadow; this.setData({ top_up: new_content.tabs_top_up, + sticky_top: this.propTop + (new_style?.tabs_margin?.margin_top || 0), goods_tabs: new_data, style_container: common_styles_computer(common_style), style_img_container: common_img_computer(common_style, this.propIndex),