e-virt-table
Version:
A powerful data table based on canvas. You can use it as data grid、Microsoft Excel or Google sheets. It supports virtual scroll、cell edit etc.
28 lines (27 loc) • 579 B
TypeScript
import type Context from './Context';
export type HistoryItemData = {
oldValue: any;
newValue: any;
key: string;
rowKey: string;
};
export type HistoryItem = {
changeList: HistoryItemData[];
scrollY: number;
scrollX: number;
type: 'single' | 'multiple';
};
/**
* 数据历史堆栈
*/
export default class History {
private ctx;
private history;
private historyIndex;
constructor(ctx: Context);
private init;
pushState(changeList: HistoryItem): void;
backState(): void;
forwardState(): void;
clear(): void;
}