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

是否考虑对树形数据结构进行支持 #418

Open
lixiaowei11111 opened this issue Oct 18, 2023 · 1 comment
Open

是否考虑对树形数据结构进行支持 #418

lixiaowei11111 opened this issue Oct 18, 2023 · 1 comment

Comments

@lixiaowei11111
Copy link

有没有办法增加对树形数据结构场景的支持,或者在现有基础上支持树形结构的虚拟列表渲染

@TinaSprunt
Copy link

TinaSprunt commented Nov 6, 2023

已经有基于vue-virtual-scroll-list的虚拟列表树实验案例,搜索虚拟列表树可以得到非常多,最简做法可以参考https://juejin.cn/post/7062676726307880997

最简做法支撑少量设备没有问题,但是对于大数据量支撑依旧存在较大的瓶颈,单个树节点下超5w+勾选就会卡顿,并且接口获取数据下载耗时也极长
Snipaste_2023-11-06_11-44-06

目前有实践基于vue-virtual-scroll-list实现虚拟列表树,支撑每个树节点下20w+数据基本没有问题:

  1. 懒加载,解决树层级过多问题
  2. 游标分页,解决单级节点数据量过多问题

效果:

  1. 展开树节点,懒加载当前节点下的前100条
  2. 滚动到当前节点下最后一条数据时,再次触发本节点下一页请求
  3. 各个节点存储自己使用的分页参数及resolve
    2

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