uni-app WeChat applet onReachBottom does not take effect

Description of the problem:
uni-app WeChat applet, the page slides to the bottom, and onReachBottom does not take effect

code:
pages.json configure

{
  "path": "",
  "style": { 
    "navigationBarTitleText": "列表",
    "onReachBottomDistance": 100 // 重点
  }
}

onReachBottomPages using :

import { onReachBottom } from '@dcloudio/uni-app'

onReachBottom(() => {
  // 你的代码逻辑
  if (parameters.value.current >= pages.value) { return }
  parameters.value.current += 1
  toSearch.value()
})

<style lang="scss" scoped>
.container {
	height: 100%;
	min-height: 100.1vh; // 重点
	overflow-y: scroll;
}
</style>

Summary:
outermost container settingsmin-height: 100.1vh

Guess you like

Origin blog.csdn.net/xiamoziqian/article/details/131440059