Giter VIP home page Giter VIP logo

Comments (5)

fangsmile avatar fangsmile commented on May 25, 2024

use api:
setScrollLeft
or
scrollToCell(cellAddr: { col?: number; row?: number })=>void
@zairl23

from vtable.

zairl23 avatar zairl23 commented on May 25, 2024

Thank you! Another question: is there the api to draw a vertical red lines in the vtable which can move by following scrollToCell api call。 @fangsmile

from vtable.

fangsmile avatar fangsmile commented on May 25, 2024

image
可以自定义渲染

args.table.getSelectedCellInfos() 获取选中状态 判断后确定自定义渲染元素应该什么

from vtable.

zairl23 avatar zairl23 commented on May 25, 2024

can draw this vertical line using cusomRenderer and animate the vertical line
@fangsmile
image

from vtable.

fangsmile avatar fangsmile commented on May 25, 2024

滚动好搞,示例后面加这么一段话:

let animationId;
let scrollX=0;
let t = Date.now();
function animate() {
  console.log('animate')
  // 更新动画的逻辑代码
  const t1 = Date.now();
  if (scrollX>=tableInstance.getAllColsWidth()) {
    console.log('cancelAnimationFrame');
    cancelAnimationFrame(animationId);
    return;
  }
  if(t1-t>=30){
    t=t1;
    tableInstance.setScrollLeft(scrollX);
    scrollX+=3;
  }
  // 执行动画播放
  animationId = requestAnimationFrame(animate);
}

// 开始动画播放
animationId = requestAnimationFrame(animate);

不过如果支持那条竖线需要写自定义函数了。可以加我们的飞书交流群找我进行具体业务场景的交流
飞书群
@zairl23

from vtable.

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.