tav-ui
Version:
15 lines (14 loc) • 749 B
TypeScript
import type { ComputedRef, Ref } from 'vue';
import type { BasicTableProps, TableEmitType, TableRowSelection } from '../types/table';
declare type Recordable<T = any> = Record<string, T>;
export declare function useRowSelection(propsRef: ComputedRef<BasicTableProps>, tableData: Ref<Recordable[]>, emit: TableEmitType): {
getRowSelection: () => TableRowSelection<any>;
getRowSelectionRef: ComputedRef<TableRowSelection<any> | null>;
getSelectRows: <T = Recordable<any>>() => T[];
getSelectRowKeys: () => string[];
setSelectedRowKeys: (rowKeys: any, syncDom?: boolean) => void;
clearSelectedRowKeys: () => void;
deleteSelectRowByKey: (key: string) => void;
setSelectedRows: (rows: Recordable[]) => void;
};
export {};