@guo514360255/element-lib
Version:
This template should help get you started developing with Vue 3 in Vite.
73 lines (72 loc) • 2.3 kB
TypeScript
import { TableConfig } from '../components/table';
/**
* 全局表格配置
*/
export declare function useConfigTable(): {
setTableConfig: (config: TableConfig) => void;
tableConfig: {
pagination?: {
pageSize: number;
pageNo: number;
total: number;
isShowPage?: boolean;
};
isShowPage?: boolean;
hideSetting?: boolean;
hidePagination?: boolean;
tableType?: "inner" | "default" | "out" | undefined;
valueKey?: {
pageSize?: string;
total?: string;
pageNo?: string;
dataListKey?: string;
};
queryParams?: {
[key: string]: any;
};
tableConfig?: {
[x: string]: any;
size?: "small" | "default" | "large" | "";
border?: boolean;
stripe?: boolean;
};
queryDataList?: (data?: any) => any;
dataSource?: any[];
columns?: {
[x: string]: any;
label?: string;
prop?: string;
type?: "index" | "selection" | "expand" | "operate" | "img" | "select" | "switch" | "time" | string;
width?: number | string;
order?: number;
render?: (data: any, item: any, index: number) => any;
infoBind?: {
round?: boolean;
toFixed?: number;
switchBind?: {
[x: string]: any;
activeText?: string;
inactiveText?: string;
activeValue?: number | string | boolean;
inactiveValue?: number | string | boolean;
inlinePrompt?: boolean;
};
change?: (event?: any, row?: any) => any;
color?: {
[key: string]: any;
};
type?: "tag";
options?: Array<{
label?: string;
value?: any;
}> | toRef<any>;
imgBind?: {
[key: string]: any;
};
dateFormat?: string;
};
hideTable?: boolean;
hideForm?: boolean;
}[];
};
};