From 039dee4f1d9044a7c48098afd5ac4300afa95b6e Mon Sep 17 00:00:00 2001 From: TianYu <332368756@qq.com> Date: Wed, 31 May 2023 11:47:23 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- yudao-ui-app/pages/goods_details/index.vue | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/yudao-ui-app/pages/goods_details/index.vue b/yudao-ui-app/pages/goods_details/index.vue index 247bd0960..22a18ab7c 100644 --- a/yudao-ui-app/pages/goods_details/index.vue +++ b/yudao-ui-app/pages/goods_details/index.vue @@ -840,12 +840,14 @@ // } query.select(idView).boundingClientRect(); query.exec(function(res) { - var top = res[0].top; - var height = res[0].height; - topArr.push(top); - heightArr.push(height); - that.$set(that, 'topArr', topArr); - that.$set(that, 'heightArr', heightArr); + if(Array.isArray(res) && res.length > 0 && res[0]){ + var top = res[0].top; + var height = res[0].height; + topArr.push(top); + heightArr.push(height); + that.$set(that, 'topArr', topArr); + that.$set(that, 'heightArr', heightArr); + } }); }; },