Giter VIP home page Giter VIP logo

Comments (2)

shakeyo avatar shakeyo commented on June 6, 2024

发现又有个新问题,导致无法选中或者选择会错位
跟踪了一下发现是因为使用pl-table的虚拟模式
在虚拟模式下,table的tr随着滚动,前后都会自动删除或者添加,导致这个rowIndex只是代表了当前table里缓存在dom里的行
这个rowIndex并不能当作当前文件的索引,但代码里根据rowIndex做了很多逻辑处理,这就导致了这些问题
解决办法简单的处理直接禁用虚拟模式,但这样大数据情况下table下的tr节点太多了,肯定卡
比较可取的方法是基于pl-table提供的tableRowClassName回调生成一个带固定索引值的样式名
然后在mousedown里取出这个值,而不是直接用table里的rowIndex
image
image

from jmal-cloud-view.

shakeyo avatar shakeyo commented on June 6, 2024

另外发现翻页计算问题,如果多次滚动,因为是异步请求数据就会导致一直请求下一页,这里的分页就失去了意义
解决办法应该是在滚动触发请求下一页时要判断上一页是否加载完毕

from jmal-cloud-view.

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.