!!!###!!!title=table carousel animation——VisActor/VTable tutorial documents!!!###!!!!!!###!!!description=VTable provides a table carousel animation plugin that supports row or column carousel animations for tables.Effect shown below:<div style="display: flex; justify-content: center;"> <img src="https://lf9-dp-fe-cms-tos.byteorg.com/obj/bit-cloud/VTable/preview/carousel-animation.gif" style="flex: 0 0 50%; padding: 10px;"></div>!!!###!!!

Table Carousel Animation Plugin

VTable provides a table carousel animation plugin that supports row or column carousel animations for tables.

Effect shown below:

Usage Example

const tableCarouselAnimationPlugin = new TableCarouselAnimationPlugin({
  rowCount: 10,
  colCount: 10,
  animationDuration: 1000,
  animationDelay: 0,
  animationEasing: 'linear',
  autoPlay: true,
  autoPlayDelay: 1000,
});

const option: VTable.ListTableConstructorOptions = {
  records,
  columns,
  plugins: [tableCarouselAnimationPlugin],
};

If you don't want the table to start playing immediately after initialization, you can set autoPlay to false and then call the play method manually to start playing.

tableCarouselAnimationPlugin.play();

Plugin Parameter Description

The plugin provides customization options, with the following parameters:

ParameterTypeDescription
rowCountnumberNumber of rows to scroll per animation
colCountnumberNumber of columns to scroll per animation
animationDurationnumberAnimation duration
animationDelaynumberAnimation delay
animationEasingstringAnimation easing function
autoPlaybooleanWhether to auto-play
autoPlayDelaynumberAuto-play delay
customDistRowFunction(row: number, table: BaseTableAPI) => { distRow: number; animation?: boolean }Custom animation distance function for rows
customDistColFunction(col: number, table: BaseTableAPI) => { distCol: number; animation?: boolean }Custom animation distance function for columns

Running Example