From a1b87f510f92f8a38eca8e08873126499195c2a8 Mon Sep 17 00:00:00 2001 From: Tony Date: Tue, 18 Dec 2018 16:45:04 +0800 Subject: [PATCH] [bugfix] Collapse: fix collapse-item height error when set content async (#1094) fix #1074 --- packages/collapse-item/index.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/packages/collapse-item/index.ts b/packages/collapse-item/index.ts index af70c961..55394096 100644 --- a/packages/collapse-item/index.ts +++ b/packages/collapse-item/index.ts @@ -58,11 +58,9 @@ VantComponent({ updateStyle(expanded) { if (expanded) { - this.getRect('.van-collapse-item__content').then(res => { - this.set({ - contentHeight: res.height ? res.height + 'px' : null + this.set({ + contentHeight: 'auto' }); - }); } else { this.set({ contentHeight: 0