同问:https://ask.dcloud.net.cn/question/147043
<script setup lang='ts'>
import { onPageScroll, onReachBottom } from '@dcloudio/uni-app';
import { nextTick, onMounted, ref } from 'vue';
onReachBottom(() => {
currentIndex.value++; // 触底+1
const arr = new Array(15).fill(1).map((v,idx) => {
return {idx}
})
list.value[currentIndex.value] = arr;
nextTick(() => {
setPageHeight()
console.log('list__',list.value);
})
})
onPageScroll(e => {
console.log('------------------e',e);
})
</script>
上述代码中,onReachBottom执行了,但是onPageScroll不执行
1 个回复
DCloud_UNI_WZF
HBuilderX 创建默认模板,vue3 运行到微信小程序并未复现该问题,请上传可复现 demo