From 7410dd0c5bdfa70a2b41dd27761b4e9fa41b4f4f Mon Sep 17 00:00:00 2001 From: sws <1141121512@qq.com> Date: Wed, 30 Oct 2024 11:52:21 +0800 Subject: [PATCH] =?UTF-8?q?1.=E9=80=89=E9=A1=B9=E5=8D=A1=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/diy/diy.vue | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/components/diy/diy.vue b/components/diy/diy.vue index a733e8bc..90fa382c 100644 --- a/components/diy/diy.vue +++ b/components/diy/diy.vue @@ -414,22 +414,18 @@ }, // 选项卡高度 tabs_height_event(height) { + let new_tabs_height = 0; // 判断是否有选项卡切选项卡数组数据内的字段is_enable值是否为1 if (this.tabs_data.length > 0) { this.tabs_data.forEach((item, index) => { if (item.is_enable == '1') { - this.setData({ - tabs_height: height, - }); - console.log(height); + new_tabs_height = height; } }); - } else { - this.setData({ - tabs_height: 0, - }); - console.log(2); } + this.setData({ + tabs_height: new_tabs_height, + }); }, // 滚动加载