Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

无限滚动组件在未指定高度时即使未滚动到底部也会继续加载 #6730

Open
5 tasks done
Hanmo123 opened this issue Jan 31, 2025 · 1 comment
Open
5 tasks done

Comments

@Hanmo123
Copy link

Hanmo123 commented Jan 31, 2025

描述错误

Jietu20250201-013306-HD.mp4

复现步骤

  1. 去除文档example中的style="height: 240px"
  2. handleLoad 中 添加 console.log
  3. 滚动直至内容超过100vh
  4. 使用滚动条回到起点(这个方法不触发handleLoad)
  5. 继续滚动
  6. 发现即使未滚动到底部,handleLoad还在继续触发

最小复现链接

https://codesandbox.io/p/sandbox/silent-sun-hjd469?welcomeVSCode=true

系统信息

System:
    OS: macOS 15.2
    CPU: (8) arm64 Apple M3
    Memory: 183.22 MB / 16.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 23.2.0 - /opt/homebrew/bin/node
    Yarn: 1.22.22 - /opt/homebrew/bin/yarn
    npm: 10.9.0 - /opt/homebrew/bin/npm
    pnpm: 9.1.0 - /opt/homebrew/bin/pnpm
  Browsers:
    Chrome: 132.0.6834.160
    Safari: 18.2
  npmPackages:
    naive-ui: ^2.41.0 => 2.41.0 
    vue: ^3.5.13 => 3.5.13

使用的包管理器

npm

验证

@Hanmo123 Hanmo123 added the untriaged need to sort label Jan 31, 2025
@jahnli
Copy link
Collaborator

jahnli commented Feb 5, 2025

It seems reasonable, if you don't specify height, the default is to occupy the full height, when you start scrolling will continue to load ah

@jahnli jahnli added waiting for response and removed untriaged need to sort labels Feb 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants