Skip to content

Commit c94e7c5

Browse files
authored
feat: 滚动加载组件,taro版,下拉刷新bug修改 (#1004)
1 parent 555aede commit c94e7c5

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/packages/__VUE/infiniteloading/index.taro.vue

+5-5
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,10 @@ export default create({
5050
type: Number,
5151
default: 200
5252
},
53+
upperThreshold: {
54+
type: Number,
55+
default: 40
56+
},
5357
pullIcon: {
5458
type: String,
5559
default: 'https://img10.360buyimg.com/imagetools/jfs/t1/169863/6/4565/6306/60125948E7e92774e/40b3a0cf42852bcb.png'
@@ -171,11 +175,6 @@ export default create({
171175
if (state.scrollTop == 0 && !state.isTouching && props.isOpenRefresh) {
172176
state.y = event.touches[0].pageY;
173177
state.isTouching = true;
174-
getParentElement('refreshTop')
175-
.boundingClientRect((rect) => {
176-
state.refreshMaxH = Math.floor(rect.height * 1 + 10);
177-
})
178-
.exec();
179178
}
180179
};
181180
@@ -205,6 +204,7 @@ export default create({
205204
};
206205
207206
onMounted(() => {
207+
state.refreshMaxH = props.upperThreshold;
208208
setTimeout(() => {
209209
getScrollHeight();
210210
}, 200);

0 commit comments

Comments
 (0)