Skip to content

Commit

Permalink
[bugfix] Collapse: fix collapse-item height error when set content as…
Browse files Browse the repository at this point in the history
…ync (#1094)

fix #1074
  • Loading branch information
TonyLuo authored and rex-zsd committed Dec 18, 2018
1 parent 5aacd6c commit a1b87f5
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions packages/collapse-item/index.ts
Expand Up @@ -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
Expand Down

0 comments on commit a1b87f5

Please sign in to comment.