@heartlee/element-components
Version:
a component library for Vue 3 base on element-plus. Forked from element-pro-components. 根据业务需求自用,如需使用,请移步官方仓库使用
29 lines (28 loc) • 1.41 kB
TypeScript
import { ComputedRef, Ref } from 'vue';
import type { ITableColumns, TableColumnsProps, ITableExpose, IPagination, UnknownObject, StringObject, MaybeRef } from '../types/index';
export declare function useTableColumns(props: Readonly<{
columns?: ITableColumns;
}>): ComputedRef<ITableColumns>;
export declare function useTableDefaultBind(props: Readonly<TableColumnsProps>): ComputedRef<TableColumnsProps>;
interface ColumnsBind extends StringObject {
slot?: boolean;
children?: unknown;
}
export declare function useTableBind<T extends ColumnsBind>(currentBind?: MaybeRef<boolean | undefined | T>, defaultBind?: MaybeRef<TableColumnsProps>): ComputedRef<StringObject>;
export declare function useTableMethods<T = UnknownObject>(): {
table: Ref<ITableExpose<T>>;
} & ITableExpose<T>;
export declare function usePagination(props: Readonly<{
pagination?: IPagination | false;
request?: (...args: any[]) => Promise<{
total: number;
data: Array<any>;
}>;
}>, emit: (event: 'update:currentPage' | 'update:pageSize' | 'size-change' | 'current-change' | 'prev-click' | 'next-click', ...args: unknown[]) => void): {
pagination: ComputedRef<IPagination | false>;
sizeChange: (size: number) => void;
currentChange: (current: number) => void;
prevClick: (current: number) => void;
nextClick: (current: number) => void;
};
export {};