element-plus
Version:
A Component Library for Vue3.0
382 lines (381 loc) • 24.7 kB
TypeScript
import { PropType } from 'vue';
import { Store } from '../store';
import { ColumnCls, ColumnStyle, Table } from '../table/defaults';
interface TableBodyProps<T> {
store: Store<T>;
stripe?: boolean;
context: Table<T>;
rowClassName: ColumnCls<T>;
rowStyle: ColumnStyle<T>;
fixed: string;
highlight: boolean;
tooltipEffect: string;
}
declare const defaultProps: {
store: {
required: boolean;
type: PropType<{
mutations: {
setData(states: {
_currentRowKey: import("vue").Ref<string>;
currentRow: import("vue").Ref<any>;
expandRowKeys: import("vue").Ref<string[]>;
treeData: import("vue").Ref<unknown>;
indent: import("vue").Ref<number>;
lazy: import("vue").Ref<boolean>;
lazyTreeNodeMap: import("vue").Ref<{}>;
lazyColumnIdentifier: import("vue").Ref<string>;
childrenColumnName: import("vue").Ref<string>;
expandRows: import("vue").Ref<any[]>;
defaultExpandAll: import("vue").Ref<boolean>;
rowKey: import("vue").Ref<string>;
data: import("vue").Ref<any[]>;
_data: import("vue").Ref<any[]>;
isComplex: import("vue").Ref<boolean>;
_columns: import("vue").Ref<import("../table-column/defaults").TableColumnCtx<any>[]>;
originColumns: import("vue").Ref<import("../table-column/defaults").TableColumnCtx<any>[]>;
columns: import("vue").Ref<import("../table-column/defaults").TableColumnCtx<any>[]>;
fixedColumns: import("vue").Ref<import("../table-column/defaults").TableColumnCtx<any>[]>;
rightFixedColumns: import("vue").Ref<import("../table-column/defaults").TableColumnCtx<any>[]>;
leafColumns: import("vue").Ref<import("../table-column/defaults").TableColumnCtx<any>[]>;
fixedLeafColumns: import("vue").Ref<import("../table-column/defaults").TableColumnCtx<any>[]>;
rightFixedLeafColumns: import("vue").Ref<import("../table-column/defaults").TableColumnCtx<any>[]>;
leafColumnsLength: import("vue").Ref<number>;
fixedLeafColumnsLength: import("vue").Ref<number>;
rightFixedLeafColumnsLength: import("vue").Ref<number>;
isAllSelected: import("vue").Ref<boolean>;
selection: import("vue").Ref<any[]>;
reserveSelection: import("vue").Ref<boolean>;
selectOnIndeterminate: import("vue").Ref<boolean>;
selectable: import("vue").Ref<(row: any, index: number) => boolean>;
filters: import("vue").Ref<Record<string, string[]>>;
filteredData: any;
sortingColumn: any;
sortProp: any;
sortOrder: any;
hoverRow: any;
}, data: any[]): void;
insertColumn(states: {
_currentRowKey: import("vue").Ref<string>;
currentRow: import("vue").Ref<any>;
expandRowKeys: import("vue").Ref<string[]>;
treeData: import("vue").Ref<unknown>;
indent: import("vue").Ref<number>;
lazy: import("vue").Ref<boolean>;
lazyTreeNodeMap: import("vue").Ref<{}>;
lazyColumnIdentifier: import("vue").Ref<string>;
childrenColumnName: import("vue").Ref<string>;
expandRows: import("vue").Ref<any[]>;
defaultExpandAll: import("vue").Ref<boolean>;
rowKey: import("vue").Ref<string>;
data: import("vue").Ref<any[]>;
_data: import("vue").Ref<any[]>;
isComplex: import("vue").Ref<boolean>;
_columns: import("vue").Ref<import("../table-column/defaults").TableColumnCtx<any>[]>;
originColumns: import("vue").Ref<import("../table-column/defaults").TableColumnCtx<any>[]>;
columns: import("vue").Ref<import("../table-column/defaults").TableColumnCtx<any>[]>;
fixedColumns: import("vue").Ref<import("../table-column/defaults").TableColumnCtx<any>[]>;
rightFixedColumns: import("vue").Ref<import("../table-column/defaults").TableColumnCtx<any>[]>;
leafColumns: import("vue").Ref<import("../table-column/defaults").TableColumnCtx<any>[]>;
fixedLeafColumns: import("vue").Ref<import("../table-column/defaults").TableColumnCtx<any>[]>;
rightFixedLeafColumns: import("vue").Ref<import("../table-column/defaults").TableColumnCtx<any>[]>;
leafColumnsLength: import("vue").Ref<number>;
fixedLeafColumnsLength: import("vue").Ref<number>;
rightFixedLeafColumnsLength: import("vue").Ref<number>;
isAllSelected: import("vue").Ref<boolean>;
selection: import("vue").Ref<any[]>;
reserveSelection: import("vue").Ref<boolean>;
selectOnIndeterminate: import("vue").Ref<boolean>;
selectable: import("vue").Ref<(row: any, index: number) => boolean>;
filters: import("vue").Ref<Record<string, string[]>>;
filteredData: any;
sortingColumn: any;
sortProp: any;
sortOrder: any;
hoverRow: any;
}, column: import("../table-column/defaults").TableColumnCtx<any>, parent: import("../table-column/defaults").TableColumnCtx<any>): void;
removeColumn(states: {
_currentRowKey: import("vue").Ref<string>;
currentRow: import("vue").Ref<any>;
expandRowKeys: import("vue").Ref<string[]>;
treeData: import("vue").Ref<unknown>;
indent: import("vue").Ref<number>;
lazy: import("vue").Ref<boolean>;
lazyTreeNodeMap: import("vue").Ref<{}>;
lazyColumnIdentifier: import("vue").Ref<string>;
childrenColumnName: import("vue").Ref<string>;
expandRows: import("vue").Ref<any[]>;
defaultExpandAll: import("vue").Ref<boolean>;
rowKey: import("vue").Ref<string>;
data: import("vue").Ref<any[]>;
_data: import("vue").Ref<any[]>;
isComplex: import("vue").Ref<boolean>;
_columns: import("vue").Ref<import("../table-column/defaults").TableColumnCtx<any>[]>;
originColumns: import("vue").Ref<import("../table-column/defaults").TableColumnCtx<any>[]>;
columns: import("vue").Ref<import("../table-column/defaults").TableColumnCtx<any>[]>;
fixedColumns: import("vue").Ref<import("../table-column/defaults").TableColumnCtx<any>[]>;
rightFixedColumns: import("vue").Ref<import("../table-column/defaults").TableColumnCtx<any>[]>;
leafColumns: import("vue").Ref<import("../table-column/defaults").TableColumnCtx<any>[]>;
fixedLeafColumns: import("vue").Ref<import("../table-column/defaults").TableColumnCtx<any>[]>;
rightFixedLeafColumns: import("vue").Ref<import("../table-column/defaults").TableColumnCtx<any>[]>;
leafColumnsLength: import("vue").Ref<number>;
fixedLeafColumnsLength: import("vue").Ref<number>;
rightFixedLeafColumnsLength: import("vue").Ref<number>;
isAllSelected: import("vue").Ref<boolean>;
selection: import("vue").Ref<any[]>;
reserveSelection: import("vue").Ref<boolean>;
selectOnIndeterminate: import("vue").Ref<boolean>;
selectable: import("vue").Ref<(row: any, index: number) => boolean>;
filters: import("vue").Ref<Record<string, string[]>>;
filteredData: any;
sortingColumn: any;
sortProp: any;
sortOrder: any;
hoverRow: any;
}, column: import("../table-column/defaults").TableColumnCtx<any>, parent: import("../table-column/defaults").TableColumnCtx<any>): void;
sort(states: {
_currentRowKey: import("vue").Ref<string>;
currentRow: import("vue").Ref<any>;
expandRowKeys: import("vue").Ref<string[]>;
treeData: import("vue").Ref<unknown>;
indent: import("vue").Ref<number>;
lazy: import("vue").Ref<boolean>;
lazyTreeNodeMap: import("vue").Ref<{}>;
lazyColumnIdentifier: import("vue").Ref<string>;
childrenColumnName: import("vue").Ref<string>;
expandRows: import("vue").Ref<any[]>;
defaultExpandAll: import("vue").Ref<boolean>;
rowKey: import("vue").Ref<string>;
data: import("vue").Ref<any[]>;
_data: import("vue").Ref<any[]>;
isComplex: import("vue").Ref<boolean>;
_columns: import("vue").Ref<import("../table-column/defaults").TableColumnCtx<any>[]>;
originColumns: import("vue").Ref<import("../table-column/defaults").TableColumnCtx<any>[]>;
columns: import("vue").Ref<import("../table-column/defaults").TableColumnCtx<any>[]>;
fixedColumns: import("vue").Ref<import("../table-column/defaults").TableColumnCtx<any>[]>;
rightFixedColumns: import("vue").Ref<import("../table-column/defaults").TableColumnCtx<any>[]>;
leafColumns: import("vue").Ref<import("../table-column/defaults").TableColumnCtx<any>[]>;
fixedLeafColumns: import("vue").Ref<import("../table-column/defaults").TableColumnCtx<any>[]>;
rightFixedLeafColumns: import("vue").Ref<import("../table-column/defaults").TableColumnCtx<any>[]>;
leafColumnsLength: import("vue").Ref<number>;
fixedLeafColumnsLength: import("vue").Ref<number>;
rightFixedLeafColumnsLength: import("vue").Ref<number>;
isAllSelected: import("vue").Ref<boolean>;
selection: import("vue").Ref<any[]>;
reserveSelection: import("vue").Ref<boolean>;
selectOnIndeterminate: import("vue").Ref<boolean>;
selectable: import("vue").Ref<(row: any, index: number) => boolean>;
filters: import("vue").Ref<Record<string, string[]>>;
filteredData: any;
sortingColumn: any;
sortProp: any;
sortOrder: any;
hoverRow: any;
}, options: import("../table/defaults").Sort): void;
changeSortCondition(states: {
_currentRowKey: import("vue").Ref<string>;
currentRow: import("vue").Ref<any>;
expandRowKeys: import("vue").Ref<string[]>;
treeData: import("vue").Ref<unknown>;
indent: import("vue").Ref<number>;
lazy: import("vue").Ref<boolean>;
lazyTreeNodeMap: import("vue").Ref<{}>;
lazyColumnIdentifier: import("vue").Ref<string>;
childrenColumnName: import("vue").Ref<string>;
expandRows: import("vue").Ref<any[]>;
defaultExpandAll: import("vue").Ref<boolean>;
rowKey: import("vue").Ref<string>;
data: import("vue").Ref<any[]>;
_data: import("vue").Ref<any[]>;
isComplex: import("vue").Ref<boolean>;
_columns: import("vue").Ref<import("../table-column/defaults").TableColumnCtx<any>[]>;
originColumns: import("vue").Ref<import("../table-column/defaults").TableColumnCtx<any>[]>;
columns: import("vue").Ref<import("../table-column/defaults").TableColumnCtx<any>[]>;
fixedColumns: import("vue").Ref<import("../table-column/defaults").TableColumnCtx<any>[]>;
rightFixedColumns: import("vue").Ref<import("../table-column/defaults").TableColumnCtx<any>[]>;
leafColumns: import("vue").Ref<import("../table-column/defaults").TableColumnCtx<any>[]>;
fixedLeafColumns: import("vue").Ref<import("../table-column/defaults").TableColumnCtx<any>[]>;
rightFixedLeafColumns: import("vue").Ref<import("../table-column/defaults").TableColumnCtx<any>[]>;
leafColumnsLength: import("vue").Ref<number>;
fixedLeafColumnsLength: import("vue").Ref<number>;
rightFixedLeafColumnsLength: import("vue").Ref<number>;
isAllSelected: import("vue").Ref<boolean>;
selection: import("vue").Ref<any[]>;
reserveSelection: import("vue").Ref<boolean>;
selectOnIndeterminate: import("vue").Ref<boolean>;
selectable: import("vue").Ref<(row: any, index: number) => boolean>;
filters: import("vue").Ref<Record<string, string[]>>;
filteredData: any;
sortingColumn: any;
sortProp: any;
sortOrder: any;
hoverRow: any;
}, options: import("../table/defaults").Sort): void;
filterChange(_states: {
_currentRowKey: import("vue").Ref<string>;
currentRow: import("vue").Ref<any>;
expandRowKeys: import("vue").Ref<string[]>;
treeData: import("vue").Ref<unknown>;
indent: import("vue").Ref<number>;
lazy: import("vue").Ref<boolean>;
lazyTreeNodeMap: import("vue").Ref<{}>;
lazyColumnIdentifier: import("vue").Ref<string>;
childrenColumnName: import("vue").Ref<string>;
expandRows: import("vue").Ref<any[]>;
defaultExpandAll: import("vue").Ref<boolean>;
rowKey: import("vue").Ref<string>;
data: import("vue").Ref<any[]>;
_data: import("vue").Ref<any[]>;
isComplex: import("vue").Ref<boolean>;
_columns: import("vue").Ref<import("../table-column/defaults").TableColumnCtx<any>[]>;
originColumns: import("vue").Ref<import("../table-column/defaults").TableColumnCtx<any>[]>;
columns: import("vue").Ref<import("../table-column/defaults").TableColumnCtx<any>[]>;
fixedColumns: import("vue").Ref<import("../table-column/defaults").TableColumnCtx<any>[]>;
rightFixedColumns: import("vue").Ref<import("../table-column/defaults").TableColumnCtx<any>[]>;
leafColumns: import("vue").Ref<import("../table-column/defaults").TableColumnCtx<any>[]>;
fixedLeafColumns: import("vue").Ref<import("../table-column/defaults").TableColumnCtx<any>[]>;
rightFixedLeafColumns: import("vue").Ref<import("../table-column/defaults").TableColumnCtx<any>[]>;
leafColumnsLength: import("vue").Ref<number>;
fixedLeafColumnsLength: import("vue").Ref<number>;
rightFixedLeafColumnsLength: import("vue").Ref<number>;
isAllSelected: import("vue").Ref<boolean>;
selection: import("vue").Ref<any[]>;
reserveSelection: import("vue").Ref<boolean>;
selectOnIndeterminate: import("vue").Ref<boolean>;
selectable: import("vue").Ref<(row: any, index: number) => boolean>;
filters: import("vue").Ref<Record<string, string[]>>;
filteredData: any;
sortingColumn: any;
sortProp: any;
sortOrder: any;
hoverRow: any;
}, options: import("../table/defaults").Filter<any>): void;
toggleAllSelection(): void;
rowSelectedChanged(_states: any, row: any): void;
setHoverRow(states: {
_currentRowKey: import("vue").Ref<string>;
currentRow: import("vue").Ref<any>;
expandRowKeys: import("vue").Ref<string[]>;
treeData: import("vue").Ref<unknown>;
indent: import("vue").Ref<number>;
lazy: import("vue").Ref<boolean>;
lazyTreeNodeMap: import("vue").Ref<{}>;
lazyColumnIdentifier: import("vue").Ref<string>;
childrenColumnName: import("vue").Ref<string>;
expandRows: import("vue").Ref<any[]>;
defaultExpandAll: import("vue").Ref<boolean>;
rowKey: import("vue").Ref<string>;
data: import("vue").Ref<any[]>;
_data: import("vue").Ref<any[]>;
isComplex: import("vue").Ref<boolean>;
_columns: import("vue").Ref<import("../table-column/defaults").TableColumnCtx<any>[]>;
originColumns: import("vue").Ref<import("../table-column/defaults").TableColumnCtx<any>[]>;
columns: import("vue").Ref<import("../table-column/defaults").TableColumnCtx<any>[]>;
fixedColumns: import("vue").Ref<import("../table-column/defaults").TableColumnCtx<any>[]>;
rightFixedColumns: import("vue").Ref<import("../table-column/defaults").TableColumnCtx<any>[]>;
leafColumns: import("vue").Ref<import("../table-column/defaults").TableColumnCtx<any>[]>;
fixedLeafColumns: import("vue").Ref<import("../table-column/defaults").TableColumnCtx<any>[]>;
rightFixedLeafColumns: import("vue").Ref<import("../table-column/defaults").TableColumnCtx<any>[]>;
leafColumnsLength: import("vue").Ref<number>;
fixedLeafColumnsLength: import("vue").Ref<number>;
rightFixedLeafColumnsLength: import("vue").Ref<number>;
isAllSelected: import("vue").Ref<boolean>;
selection: import("vue").Ref<any[]>;
reserveSelection: import("vue").Ref<boolean>;
selectOnIndeterminate: import("vue").Ref<boolean>;
selectable: import("vue").Ref<(row: any, index: number) => boolean>;
filters: import("vue").Ref<Record<string, string[]>>;
filteredData: any;
sortingColumn: any;
sortProp: any;
sortOrder: any;
hoverRow: any;
}, row: any): void;
setCurrentRow(_states: any, row: any): void;
};
commit: (name: "setData" | "insertColumn" | "removeColumn" | "sort" | "changeSortCondition" | "filterChange" | "toggleAllSelection" | "rowSelectedChanged" | "setHoverRow" | "setCurrentRow", ...args: any[]) => void;
updateTableScrollY: () => void;
assertRowKey: () => void;
updateColumns: () => void;
scheduleLayout: (needUpdateColumns?: boolean, immediate?: boolean) => void;
isSelected: (row: any) => boolean;
clearSelection: () => void;
cleanSelection: () => void;
toggleRowSelection: (row: any, selected?: any, emitChange?: boolean) => void;
_toggleAllSelection: () => void;
toggleAllSelection: any;
updateSelectionByRowKey: () => void;
updateAllSelected: () => void;
updateFilters: (columns: any, values: any) => {};
updateCurrentRow: (_currentRow: any) => void;
updateSort: (column: any, prop: any, order: any) => void;
execFilter: () => void;
execSort: () => void;
execQuery: (ignore?: any) => void;
clearFilter: (columnKeys: any) => void;
clearSort: () => void;
toggleRowExpansion: (row: any, expanded?: boolean) => void;
setExpandRowKeysAdapter: (val: string[]) => void;
setCurrentRowKey: (key: string) => void;
toggleRowExpansionAdapter: (row: any, expanded: boolean) => void;
isRowExpanded: (row: any) => boolean;
updateExpandRows: () => void;
updateCurrentRowData: () => void;
loadOrToggle: (row: any) => void;
states: {
_currentRowKey: import("vue").Ref<string>;
currentRow: import("vue").Ref<any>;
expandRowKeys: import("vue").Ref<string[]>;
treeData: import("vue").Ref<unknown>;
indent: import("vue").Ref<number>;
lazy: import("vue").Ref<boolean>;
lazyTreeNodeMap: import("vue").Ref<{}>;
lazyColumnIdentifier: import("vue").Ref<string>;
childrenColumnName: import("vue").Ref<string>;
expandRows: import("vue").Ref<any[]>;
defaultExpandAll: import("vue").Ref<boolean>;
rowKey: import("vue").Ref<string>;
data: import("vue").Ref<any[]>;
_data: import("vue").Ref<any[]>;
isComplex: import("vue").Ref<boolean>;
_columns: import("vue").Ref<import("../table-column/defaults").TableColumnCtx<any>[]>;
originColumns: import("vue").Ref<import("../table-column/defaults").TableColumnCtx<any>[]>;
columns: import("vue").Ref<import("../table-column/defaults").TableColumnCtx<any>[]>;
fixedColumns: import("vue").Ref<import("../table-column/defaults").TableColumnCtx<any>[]>;
rightFixedColumns: import("vue").Ref<import("../table-column/defaults").TableColumnCtx<any>[]>;
leafColumns: import("vue").Ref<import("../table-column/defaults").TableColumnCtx<any>[]>;
fixedLeafColumns: import("vue").Ref<import("../table-column/defaults").TableColumnCtx<any>[]>;
rightFixedLeafColumns: import("vue").Ref<import("../table-column/defaults").TableColumnCtx<any>[]>;
leafColumnsLength: import("vue").Ref<number>;
fixedLeafColumnsLength: import("vue").Ref<number>;
rightFixedLeafColumnsLength: import("vue").Ref<number>;
isAllSelected: import("vue").Ref<boolean>;
selection: import("vue").Ref<any[]>;
reserveSelection: import("vue").Ref<boolean>;
selectOnIndeterminate: import("vue").Ref<boolean>;
selectable: import("vue").Ref<(row: any, index: number) => boolean>;
filters: import("vue").Ref<Record<string, string[]>>;
filteredData: any;
sortingColumn: any;
sortProp: any;
sortOrder: any;
hoverRow: any;
};
}>;
};
stripe: BooleanConstructor;
tooltipEffect: StringConstructor;
context: {
default: () => {};
type: PropType<Table<any>>;
};
rowClassName: PropType<ColumnCls<any>>;
rowStyle: PropType<ColumnStyle<any>>;
fixed: {
type: StringConstructor;
default: string;
};
highlight: BooleanConstructor;
};
export { TableBodyProps };
export default defaultProps;