From f2080a3b3bb0ae16818cb344480813676c599c97 Mon Sep 17 00:00:00 2001 From: "GRANDSOFT\\baosc" Date: Wed, 27 Oct 2021 17:22:39 +0800 Subject: [PATCH] =?UTF-8?q?index-bar=20=E5=9C=A8wx:if=E4=B8=BAfalse?= =?UTF-8?q?=E6=97=B6=EF=BC=8C=20=E6=8A=9B=E5=BC=82=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/index-bar/index.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/index-bar/index.ts b/packages/index-bar/index.ts index 6ec0274c..67372cac 100644 --- a/packages/index-bar/index.ts +++ b/packages/index-bar/index.ts @@ -101,6 +101,9 @@ VantComponent({ setListRect() { return getRect(this, '.van-index-bar').then((rect) => { + if (!isDef(rect)) { + return; + } Object.assign(this, { height: rect.height, top: rect.top + this.scrollTop,