mc-pro-ui
Version:
一个功能强大的 Vue 3 UI 组件库,提供完整的 TypeScript 支持
55 lines (54 loc) • 1.59 kB
TypeScript
export declare const useTable: (api?: (params: any) => Promise<any>, initParam?: object, isPageable?: boolean, paginationInit?: Record<string, any>, paginationFields?: {
page?: string;
size?: string;
total?: string;
list?: string;
}, dataCallBack?: (data: any) => any, requestError?: (error: any) => void) => {
getTableList: () => Promise<void>;
search: () => void;
reset: () => void;
handleSizeChange: (val: number) => void;
handleCurrentChange: (val: number) => void;
updatedTotalParam: () => void;
initSearchParams: (defaultParams?: Record<string, any>) => void;
tableData: globalThis.Ref<any[], any[]>;
pageable: globalThis.Ref<{
pageNum: number;
pageSize: number;
total: number;
size: "default" | "small" | "large";
pageField?: string;
sizeField?: string;
totalField?: string;
listField?: string;
}, {
pageNum: number;
pageSize: number;
total: number;
size: "default" | "small" | "large";
pageField?: string;
sizeField?: string;
totalField?: string;
listField?: string;
}>;
searchParam: globalThis.Ref<{
[key: string]: any;
}, {
[key: string]: any;
}>;
searchInitParam: globalThis.Ref<{
[key: string]: any;
}, {
[key: string]: any;
}>;
totalParam: globalThis.Ref<{
[key: string]: any;
}, {
[key: string]: any;
}>;
icon?: globalThis.Ref<{
[key: string]: any;
}, {
[key: string]: any;
}>;
};