File tree 2 files changed +10
-7
lines changed
packages/wx-react-native/miniprogram_dist/component/WXFlatList
2 files changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -195,13 +195,16 @@ Component({
195
195
return
196
196
}
197
197
198
- if ( this . compInst . props . data === this . endReachedInvokeData ) {
199
- return
200
- }
198
+ const query = wx . createSelectorQuery ( ) . in ( this )
199
+ query . select ( '#container' ) . boundingClientRect ( ( res ) => {
200
+ const height = res . height
201
+ if ( this . lastHeight === height ) return
202
+
201
203
202
- this . endReachedInvokeData = this . compInst . props . data
203
- const method = getPropsMethod ( this , 'onEndReached' )
204
- method && method ( )
204
+ this . lastHeight = height
205
+ const method = getPropsMethod ( this , 'onEndReached' )
206
+ method && method ( )
207
+ } ) . exec ( )
205
208
}
206
209
} ,
207
210
data : {
Original file line number Diff line number Diff line change 31
31
lower-threshold="{{100}}"
32
32
scroll-into-view="{{index_id}}"
33
33
>
34
- <view style="{{contentContainerStyle}}min-height: calc(100% + {{onRefreshPassed ? 80 : 0}}px)">
34
+ <view id="container" style="{{contentContainerStyle}}min-height: calc(100% + {{onRefreshPassed ? 80 : 0}}px)">
35
35
<view
36
36
wx:if="{{onRefreshPassed}}"
37
37
style="height:80px;align-items:center;justify-content:center;"
You can’t perform that action at this time.
0 commit comments