UNPKG

tav-ui

Version:
32 lines (31 loc) 2.16 kB
import { type UseCheckboxCacheReturn } from './useCheckboxCache'; import type { ComputedRef, Ref } from 'vue'; import type { ITableProInstance, TableProInstance, TableProProps } from '../types'; import type { TableProApiParams } from '../typings'; declare function createExendApis(tableRef: Ref<TableProInstance | null>, tablePropsRef: ComputedRef<TableProProps>, filterRef: any, isCheckboxCacheEnabled: UseCheckboxCacheReturn['isCheckboxCacheEnabled'], checkboxCacheList: UseCheckboxCacheReturn['checkboxCacheList'], deleteCheckboxCache: UseCheckboxCacheReturn['deleteCheckboxCache'], deleteAllCheckboxCache: UseCheckboxCacheReturn['deleteAllCheckboxCache'], currentPage: Ref<number>): { getSelectRowKeys: () => string[]; clearSelectedRowByKey: (keyField: string | number) => Promise<void>; getSelectRows: () => any[]; clearSelectedRows: () => Promise<void>; insertRow: (records: Record<string, any> | Record<string, any>[]) => void; updateRow: (records: Record<string, any> | Record<string, any>[]) => void; deleteRow: (records: Record<string, any> | Record<string, any>[]) => void; reload: (options?: TableProApiParams | undefined) => Promise<void>; }; /** 扩展实例 */ declare type OuterExtendApis = { setLoading: (loading: boolean) => void; resetFilterInput: () => void; resizeTableHeight: () => void; showExportModal: () => void; showColumnsModa: () => void; clearCellTooltip: () => void; }; export declare type TableProExtendApis = ReturnType<typeof createExendApis> & OuterExtendApis; /** * 扩展 vxegrid instance 实例 * @param tableRef * @returns */ export declare function useExtendInstance(tableRef: Ref<TableProInstance | null>, tablePropsRef: ComputedRef<TableProProps>, outerExtendApis: OuterExtendApis, filterRef: Ref<ComputedRef | null>, isCheckboxCacheEnabled: UseCheckboxCacheReturn['isCheckboxCacheEnabled'], checkboxCacheList: UseCheckboxCacheReturn['checkboxCacheList'], deleteCheckboxCache: UseCheckboxCacheReturn['deleteCheckboxCache'], deleteAllCheckboxCache: UseCheckboxCacheReturn['deleteAllCheckboxCache'], currentPage: Ref<number>): ITableProInstance; export {};