Giter VIP home page Giter VIP logo

Comments (4)

qishibo avatar qishibo commented on June 24, 2024

指的是滑块和鼠标之间的错位

from el-table-virtual-scroll.

xiaocheng555 avatar xiaocheng555 commented on June 24, 2024

https://xiaocheng555.github.io/el-table-virtual-scroll/#/SortDemo?code=SortDemo&codeTitle=%E6%8E%92%E5%BA%8F 看的是这个demo,发现拖动滚动条时会出现错位现象,逐渐变大的那种,这种正常么

image

item-size设置了估计行高为62,但是实际行高是71,而滚动容器是由 2000 * 62(行数 * 行高) 撑起滚动内容高度的,而实际上虚拟滚动会更新实际每行的高度也就是71,导致滚动容器滚动内容高度越来越大于 2000 * 62并慢慢地变为 2000 * 71,所以容器每次滚动都会让容器滚动内容高度变大,是的滚动条错位。

只要将item-size 设置为 71就好了
image

from el-table-virtual-scroll.

xiaocheng555 avatar xiaocheng555 commented on June 24, 2024

demo 已经更新,如果页面有缓存记得清一下缓存再看效果,排序源码这里是设置为item-size为71的
image

from el-table-virtual-scroll.

qishibo avatar qishibo commented on June 24, 2024

赞,好使了

from el-table-virtual-scroll.

Related Issues (20)

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.