From e924f14bec1f3570ca3964982cf6ad98229af49d Mon Sep 17 00:00:00 2001 From: ZakaryCode Date: Sun, 25 Apr 2021 01:00:58 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=8A=A0=E8=BD=BD=E7=BB=84=E4=BB=B6?= =?UTF-8?q?=E5=90=8E=E5=88=B7=E6=96=B0=E7=BB=84=E4=BB=B6=E9=AB=98=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../virtual-list/react/createListComponent.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/packages/taro-components/virtual-list/react/createListComponent.js b/packages/taro-components/virtual-list/react/createListComponent.js index 0772702c537b..2c098bd74de1 100644 --- a/packages/taro-components/virtual-list/react/createListComponent.js +++ b/packages/taro-components/virtual-list/react/createListComponent.js @@ -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 () {