@jiaozhiye/qm-design-vue
Version:
A Component Library for Vue3.0
36 lines (35 loc) • 1.53 kB
TypeScript
import { Ref, ComputedRef } from 'vue';
import type { ITableRef } from './useTableVar';
import type { TableBodyRef, IColumn, IPagination, IRowKey, IDerivedRowKeys, ITableProps } from '../table/types';
import type { ComponentSize } from '../../../_utils/types';
type IExtra = {
tableVar: ITableRef;
tableBodyRef: Ref<TableBodyRef | undefined>;
$size: ComputedRef<ComponentSize>;
pagination: Ref<IPagination>;
selectionKeys: Ref<IDerivedRowKeys>;
rowExpandedKeys: Ref<IDerivedRowKeys>;
highlightKey: Ref<IRowKey>;
summationRows: ComputedRef<Record<string, number | string>[]>;
showSummary: ComputedRef<boolean>;
isWebPagination: ComputedRef<boolean>;
isScrollPagination: ComputedRef<boolean>;
checkDataIndex: () => void;
toLastPage: () => void;
toFirstPage: () => void;
getPageCount: () => number;
setHandleState: (option: ITableRef['handleState']) => void;
scrollYToRecord: (rowKey: IRowKey, index?: number) => void;
setOriginColumns: (columns: IColumn[]) => void;
setSelectionKeysEffect: (rowKeys: IRowKey[]) => void;
setRowExpandedKeys: (rowKeys: IRowKey[]) => void;
setHighlightKey: (rowKey: IRowKey) => void;
setResizeState: (option: ITableRef['resizeState']) => void;
createElementStore: () => void;
calcTableHeight: () => void;
forceUpdate: () => void;
initialTable: () => void;
destroy: () => void;
};
declare const useTableEffect: <T extends ITableProps>(props: T, extra: IExtra) => void;
export default useTableEffect;