UNPKG

tav-ui

Version:
21 lines (20 loc) 867 B
import type { ComputedRef } from 'vue'; import type { BasicTableProps, TableEmitType } from '../types/table'; declare type Recordable<T = any> = Record<string, T>; interface Options { setSelectedRowKeys: (keys: string[]) => void; getSelectRowKeys: () => string[]; clearSelectedRowKeys: () => void; emit: TableEmitType; getAutoCreateKey: ComputedRef<boolean | undefined>; } export declare function useCustomRow(propsRef: ComputedRef<BasicTableProps>, { setSelectedRowKeys, getSelectRowKeys, getAutoCreateKey, clearSelectedRowKeys, emit }: Options): { customRow: (record: Recordable, index: number) => { onClick: (e: Event) => void; onDblclick: (event: Event) => void; onContextmenu: (event: Event) => void; onMouseenter: (event: Event) => void; onMouseleave: (event: Event) => void; }; }; export {};