@aplus-frontend/ui
Version:
57 lines (56 loc) • 1.93 kB
TypeScript
import { ConfigProviderProps } from './config-provider-props';
import { InjectionKey, Ref, VNode } from 'vue';
import { Recordable } from '../type';
import { client } from '@aplus-frontend/oss';
import { DefaultOptionType } from '@aplus-frontend/antdv/es/select';
export type ConfigProviderContext = Partial<ConfigProviderProps>;
export declare const configProviderContextKey: InjectionKey<Ref<ConfigProviderContext>>;
type CommonOptionItem = {
label?: string;
value?: string | number | boolean;
disabled?: boolean;
[key: string]: any;
};
type ApiSelectOption = Omit<DefaultOptionType, 'children'>;
export type ApiType = {
radioGroup?: (args?: any) => Promise<CommonOptionItem[]>;
select?: (args?: any) => Promise<ApiSelectOption[]>;
};
export type ApUploadConfig = {
dirName?: string;
getOssAccess?: Parameters<typeof client.initOssClient>[0]['getOssAccess'];
needName?: boolean | {
pathKey?: string;
nameKey?: string;
};
accept?: string;
};
export type ValueTypeRenderConfig = {
render?: (text: any, record: Recordable, renderProps: Recordable) => VNode;
renderFormItem?: (fieldProps: Recordable) => VNode;
};
export type ApDescriptionsConfig = {
downloadFile?: (url: string, name: string) => void;
};
export type downloadCenterTriggerConfigParams = {
fileName?: string;
fileSource?: string;
objectName?: string;
[propName: string]: unknown;
};
export type downloadCenterTriggerConfig = {
trigger: (fileList: downloadCenterTriggerConfigParams[]) => Promise<any>;
};
export type SearchFormGlobalConfig = {
customFilled?: (node: VNode, value: any) => boolean;
};
export type ExportField = boolean | {
key?: string;
convertField?: {
[key: string]: string[];
};
};
export declare const DEFAULT_NAMESPACE = "aplus";
export declare const DEFAULT_UIMODE = "aplus";
export type UiModeType = 'aplus' | 'admin';
export {};