Skip to content

Commit

Permalink
fix: 加载组件后刷新组件高度
Browse files Browse the repository at this point in the history
  • Loading branch information
ZakaryCode authored and Chen-jj committed Apr 25, 2021
1 parent 4acada5 commit e924f14
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -436,6 +436,14 @@ export default function createListComponent ({
}

this._callPropsCallbacks(prevProps, prevState)

setTimeout(() => {
const [startIndex, stopIndex] = this._getRangeToRender()
const isHorizontal = isHorizontalFunc(this.props)
for (let index = startIndex; index <= stopIndex; index++) {
this._getSizeUploadSync(index, isHorizontal)
}
}, 0)
}

componentWillUnmount () {
Expand Down

1 comment on commit e924f14

@Rambos
Copy link

@Rambos Rambos commented on e924f14 May 11, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个fix ,会导致报错啊 ,大哥 @ZakaryCode @Chen-jj
image

Please sign in to comment.