支持行标记为删除

This commit is contained in:
xuliangzhan
2023-12-25 00:43:19 +08:00
parent 2287306a32
commit 0013030014
15 changed files with 385 additions and 174 deletions

2
types/grid.d.ts vendored
View File

@@ -10,7 +10,7 @@ import { RowInfo } from './component'
/* eslint-disable no-use-before-define */
/**
* 高级表格
* 配置式表格
*/
export declare class Grid extends Table {
/**

17
types/table.d.ts vendored
View File

@@ -600,6 +600,22 @@ export declare class Table extends VXETableComponent {
* @param row 指定行
*/
setRadioRow(row: RowInfo): Promise<any>;
/**
* 将指定行设置为取消/标记待删除状态
*/
setPendingRow(rows: any | any[], status: boolean): Promise<any>
/**
* 切换指定行的取消/标记待删除状态
*/
togglePendingRow(rows: any | any[]): Promise<any>
/**
* 获取待删除状态的数据
*/
getPendingRecords(): any[]
/**
* 清除所有标记状态
*/
clearPendingRow(): Promise<any>
/**
* 手动清除临时合并的单元格
*/
@@ -913,6 +929,7 @@ export declare class Table extends VXETableComponent {
insertRecords: RowInfo[];
removeRecords: RowInfo[];
updateRecords: RowInfo[];
pendingRecords: RowInfo[]
};
/**

View File

@@ -181,7 +181,7 @@ export class TableRenderParams extends RenderParams {
export class GridRenderParams extends TableRenderParams {
/**
* 高级表格实例对象
* 配置式表格实例对象
*/
$grid: Grid;
}