ivue-material-plus
Version:
A high quality UI components Library with Vue.js
71 lines (70 loc) • 2.8 kB
TypeScript
import type { WatcherPropsData } from './index';
import type { TableColumnCtx } from '../table-column/defaults';
declare function useExpand(watcherData: WatcherPropsData): {
updateExpandRows: () => void;
toggleRowExpansion: (row: any, expanded?: boolean) => void;
setExpandRowKeys: (rowKeys: string[]) => void;
isRowExpanded: (row: any) => boolean;
states: {
defaultExpandAll: import("vue").Ref<boolean>;
expandRows: import("vue").Ref<{
id: string;
prop: string;
label: string;
width: string | number;
minWidth: string | number;
children?: any[];
isSubColumn: boolean;
type: string;
sortable: string | boolean;
property: string;
align: string;
headerAlign: string;
showOverflowTooltip: boolean;
filters: {
text: string;
value: string;
}[];
filterMethod: (value: any, row: any, column: TableColumnCtx) => void;
filterPlacement: string;
filterOpened?: boolean;
index: number | ((index: number) => number);
rawColumnKey: string;
renderHeader: (data: {
column: TableColumnCtx;
$index: number;
}) => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
[key: string]: any;
}>;
renderCell: (data: any) => void;
formatter: (row: Record<string, any>, column: TableColumnCtx, cellValue: any, index: number) => string | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
[key: string]: any;
}>;
columnWidth: number;
className: string;
fixed: string | boolean;
getColumnIndex: () => number;
currentIndex: number;
level: number;
rowSpan: number;
colSpan: number;
order: string;
labelClassName: string;
columns: any[];
resizable: boolean;
selectable: (row: any, index: string | number) => boolean;
reserveSelection: boolean;
sortOrders: ("descending" | "ascending")[];
sortBy: string | string[] | ((row: any, index: number) => string);
sortMethod: (a: any, b: any) => number;
columnKey: string;
filterable: boolean | ((value: any, row: any, column: TableColumnCtx) => void) | {
text: string;
value: string;
}[];
filterMultiple: boolean;
filteredValue: string[];
}[]>;
};
};
export default useExpand;