Coder Social home page Coder Social logo

tnfe / vue3-infinite-list Goto Github PK

View Code? Open in Web Editor NEW
223.0 8.0 37.0 775 KB

一个支持百万数量级的Vue3无限滚动列表组件

Home Page: https://tnfe.github.io/vue3-infinite-list

HTML 4.20% TypeScript 53.76% Vue 40.12% JavaScript 1.91%
vue-infinite-list infinite-list vue-infinite-scroll infinite

vue3-infinite-list's People

Contributors

adajuly avatar dependabot[bot] avatar drawcall avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

vue3-infinite-list's Issues

盒子高度超过26843542像素问题

如果渲染一千万条数据,整个盒子高度会很大,但实际盒子最大高度只能到26843542像素,就可能会造成滚到底部依然无法渲染后面的数据的问题。

README.zh-CN.md 中文翻译有问题

README.zh-CN.md 中文翻译有问题,这不叫无限滚动加载库吧,本身没有判断滚动到底后的加载事件,需要额外编写监听滚动事件进行加载。最多叫无限列表。

Dyanmic data bug

Dynamic data seems to not be 100%.

Let's say I have a list of 10000 items, and a search bar.

I start typing in search bar, which shrinks my data to say 100 items. Vue3-infinite-list crashes with:

Uncaught (in promise) Error: Requested index 28 is outside of range 0..28
at SizeAndPosManager.getSizeAndPositionForIndex (vue3-infinite-list.es.js:90:1)
at Proxy.getItemStyle (vue3-infinite-list.es.js:344:39)
at vue3-infinite-list.es.js:524:32
at renderList (runtime-core.esm-bundler.js:6497:1)
at Proxy._sfc_render (vue3-infinite-list.es.js:521:70)
at renderComponentRoot (runtime-core.esm-bundler.js:893:1)
at ReactiveEffect.componentUpdateFn [as fn] (runtime-core.esm-bundler.js:5098:1)
at ReactiveEffect.run (reactivity.esm-bundler.js:167:1)
at updateComponent (runtime-core.esm-bundler.js:4968:1)
at processComponent (runtime-core.esm-bundler.js:4901:1)

I think the logic needs to be adjusted to deal with being scrolling past the end of the data?

how to use inside of nested v-for ?

                <div v-for="(col, iCol) in dl.lst" :key="iCol class="col c2  h-[168px]    text-center  " ">
                    <div class="cell border-b border-slate-500 w-[26px] h-[26px]    text-center overflow-hidden "
                        v-for="(c, iRow) in col" :key="iRow">

                        <img v-if="c >= 100" :src="'/static/img/dl-' + c + '.png'" alt=""
                            class="h-[100%] w-full  align-center p-[2px] ">

                    </div>
                </div>

完全自动化的高度有计划吗

列表项的高度完全由实际渲染决定,不再设置(itemSize)之类任何的有关高度的设置。完全预估形式的,这样比itemSize来的更加有特色。可能性能上稍逊。
ps:可以参考这个库的预估高度思路

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.