@antdv/pro-field
Version:
原子信息组件,统一 ProForm、ProTable、ProList、Filter 等组件里面的字段定义。
130 lines (129 loc) • 15.1 kB
TypeScript
import type { ProFieldRequestData, ProFieldTextType, ProFieldValueObjectType, ProFieldValueType, VueNode } from '@antdv/pro-utils';
import type { ExtractPublicPropTypes, Ref, SlotsType, VNode } from 'vue';
import type { FieldMoneyProps } from './components/Money';
import type { ProFieldFCRenderProps } from './components/props';
import FieldCode from './components/Code';
import FieldDatePicker from './components/DatePicker';
import FieldIndexColumn from './components/IndexColumn';
import FieldMoney from './components/Money';
import FieldPercent from './components/Percent';
import FieldProgress from './components/Progress';
import FieldRangePicker from './components/RangePicker';
import FieldSelect, { proFieldParsingValueEnumToArray } from './components/Select';
import FieldStatus from './components/Status';
import FieldText from './components/Text';
import FieldTimePicker from './components/TimePicker';
export type ProFieldMoneyProps = FieldMoneyProps;
export type ProFieldEmptyText = string | false;
export type ProFieldValueTypeFunction<T> = (item: T) => ProFieldValueType | ProFieldValueObjectType;
export { FieldCode, FieldDatePicker, FieldIndexColumn, FieldMoney, FieldPercent, FieldProgress, FieldRangePicker, FieldSelect, FieldStatus, FieldText, FieldTimePicker, proFieldParsingValueEnumToArray, };
export type { FieldMoneyProps };
declare const renderProps: {
readonly request: import("@antdv/pro-utils").VueTypeValidateDef<ProFieldRequestData, import("@antdv/pro-utils").ValidatorFunction<ProFieldRequestData>>;
readonly emptyText: import("@antdv/pro-utils").VueTypeValidateDef<VueNode, import("@antdv/pro-utils").ValidatorFunction<VueNode>>;
readonly open: import("@antdv/pro-utils").VueTypeValidateDef<boolean, import("@antdv/pro-utils").ValidatorFunction<boolean>>;
readonly onOpenChange: import("@antdv/pro-utils").VueTypeValidateDef<(open: boolean) => void, import("@antdv/pro-utils").ValidatorFunction<(open: boolean) => void>>;
readonly render: import("@antdv/pro-utils").VueTypeValidateDef<(text: any, props: Ref<Omit<ProFieldFCRenderProps, "value" | "onChange">>, dom: VNode) => VNode, import("@antdv/pro-utils").ValidatorFunction<(text: any, props: Ref<Omit<ProFieldFCRenderProps, "value" | "onChange">>, dom: VNode) => VNode>>;
readonly renderFormItem: import("@antdv/pro-utils").VueTypeValidateDef<(text: any, props: Ref<ProFieldFCRenderProps>, dom: VNode) => VNode | null, import("@antdv/pro-utils").ValidatorFunction<(text: any, props: Ref<ProFieldFCRenderProps>, dom: VNode) => VNode | null>>;
readonly text: import("@antdv/pro-utils").VueTypeValidateDef<any, import("@antdv/pro-utils").ValidatorFunction<any>>;
readonly fieldProps: import("@antdv/pro-utils").VueTypeValidateDef<any, import("@antdv/pro-utils").ValidatorFunction<any>>;
readonly mode: import("@antdv/pro-utils").VueTypeValidateDef<import("@antdv/pro-utils").ProFieldFCMode, import("@antdv/pro-utils").ValidatorFunction<import("@antdv/pro-utils").ProFieldFCMode>>;
readonly plain: import("@antdv/pro-utils").VueTypeValidateDef<boolean, import("@antdv/pro-utils").ValidatorFunction<boolean>>;
readonly light: import("@antdv/pro-utils").VueTypeValidateDef<boolean, import("@antdv/pro-utils").ValidatorFunction<boolean>>;
readonly label: import("@antdv/pro-utils").VueTypeValidateDef<VueNode, import("@antdv/pro-utils").ValidatorFunction<VueNode>>;
readonly valueEnum: import("@antdv/pro-utils").VueTypeValidateDef<import("@antdv/pro-utils").ProSchemaValueEnumObj | import("@antdv/pro-utils").ProSchemaValueEnumMap, import("@antdv/pro-utils").ValidatorFunction<import("@antdv/pro-utils").ProSchemaValueEnumObj | import("@antdv/pro-utils").ProSchemaValueEnumMap>>;
readonly proFieldKey: import("@antdv/pro-utils").VueTypeDef<import("@antdv/pro-utils").Key>;
readonly readonly: import("@antdv/pro-utils").VueTypeValidateDef<boolean, import("@antdv/pro-utils").ValidatorFunction<boolean>>;
readonly onChange: import("@antdv/pro-utils").VueTypeValidateDef<(...rest: any[]) => void, import("@antdv/pro-utils").ValidatorFunction<(...rest: any[]) => void>>;
};
export type RenderProps = ExtractPublicPropTypes<typeof renderProps>;
export declare const proFieldProps: {
readonly request: import("@antdv/pro-utils").VueTypeValidateDef<ProFieldRequestData, import("@antdv/pro-utils").ValidatorFunction<ProFieldRequestData>>;
readonly emptyText: import("@antdv/pro-utils").VueTypeValidateDef<VueNode, import("@antdv/pro-utils").ValidatorFunction<VueNode>>;
readonly open: import("@antdv/pro-utils").VueTypeValidateDef<boolean, import("@antdv/pro-utils").ValidatorFunction<boolean>>;
readonly onOpenChange: import("@antdv/pro-utils").VueTypeValidateDef<(open: boolean) => void, import("@antdv/pro-utils").ValidatorFunction<(open: boolean) => void>>;
readonly render: import("@antdv/pro-utils").VueTypeValidateDef<(text: any, props: Ref<Omit<ProFieldFCRenderProps, "value" | "onChange">>, dom: VNode) => VNode, import("@antdv/pro-utils").ValidatorFunction<(text: any, props: Ref<Omit<ProFieldFCRenderProps, "value" | "onChange">>, dom: VNode) => VNode>>;
readonly renderFormItem: import("@antdv/pro-utils").VueTypeValidateDef<(text: any, props: Ref<ProFieldFCRenderProps>, dom: VNode) => VNode | null, import("@antdv/pro-utils").ValidatorFunction<(text: any, props: Ref<ProFieldFCRenderProps>, dom: VNode) => VNode | null>>;
readonly text: import("@antdv/pro-utils").VueTypeValidateDef<any, import("@antdv/pro-utils").ValidatorFunction<any>>;
readonly fieldProps: import("@antdv/pro-utils").VueTypeValidateDef<any, import("@antdv/pro-utils").ValidatorFunction<any>>;
readonly mode: import("@antdv/pro-utils").VueTypeValidateDef<import("@antdv/pro-utils").ProFieldFCMode, import("@antdv/pro-utils").ValidatorFunction<import("@antdv/pro-utils").ProFieldFCMode>>;
readonly plain: import("@antdv/pro-utils").VueTypeValidateDef<boolean, import("@antdv/pro-utils").ValidatorFunction<boolean>>;
readonly light: import("@antdv/pro-utils").VueTypeValidateDef<boolean, import("@antdv/pro-utils").ValidatorFunction<boolean>>;
readonly label: import("@antdv/pro-utils").VueTypeValidateDef<VueNode, import("@antdv/pro-utils").ValidatorFunction<VueNode>>;
readonly valueEnum: import("@antdv/pro-utils").VueTypeValidateDef<import("@antdv/pro-utils").ProSchemaValueEnumObj | import("@antdv/pro-utils").ProSchemaValueEnumMap, import("@antdv/pro-utils").ValidatorFunction<import("@antdv/pro-utils").ProSchemaValueEnumObj | import("@antdv/pro-utils").ProSchemaValueEnumMap>>;
readonly proFieldKey: import("@antdv/pro-utils").VueTypeDef<import("@antdv/pro-utils").Key>;
readonly readonly: import("@antdv/pro-utils").VueTypeValidateDef<boolean, import("@antdv/pro-utils").ValidatorFunction<boolean>>;
readonly onChange: import("@antdv/pro-utils").VueTypeValidateDef<(...rest: any[]) => void, import("@antdv/pro-utils").ValidatorFunction<(...rest: any[]) => void>>;
readonly value: import("@antdv/pro-utils").VueTypeDef<ProFieldTextType> & {
default: string | number | boolean | (() => void) | (() => VNode<import("vue").RendererNode, import("vue").RendererElement, {
[key: string]: any;
}>) | (() => import("@antdv/pro-utils").VNodeChildAtom[]) | (() => VNode<import("vue").RendererNode, import("vue").RendererElement, {
[key: string]: any;
}>) | (() => Record<string, any>) | (() => Record<string, any>[]) | null | undefined;
};
readonly valueType: import("@antdv/pro-utils").VueTypeDef<ProFieldValueType | ProFieldValueObjectType>;
};
export type ProFieldPropsType = ExtractPublicPropTypes<typeof proFieldProps>;
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
readonly request: import("@antdv/pro-utils").VueTypeValidateDef<ProFieldRequestData, import("@antdv/pro-utils").ValidatorFunction<ProFieldRequestData>>;
readonly emptyText: import("@antdv/pro-utils").VueTypeValidateDef<VueNode, import("@antdv/pro-utils").ValidatorFunction<VueNode>>;
readonly open: import("@antdv/pro-utils").VueTypeValidateDef<boolean, import("@antdv/pro-utils").ValidatorFunction<boolean>>;
readonly onOpenChange: import("@antdv/pro-utils").VueTypeValidateDef<(open: boolean) => void, import("@antdv/pro-utils").ValidatorFunction<(open: boolean) => void>>;
readonly render: import("@antdv/pro-utils").VueTypeValidateDef<(text: any, props: Ref<Omit<ProFieldFCRenderProps, "value" | "onChange">>, dom: VNode) => VNode, import("@antdv/pro-utils").ValidatorFunction<(text: any, props: Ref<Omit<ProFieldFCRenderProps, "value" | "onChange">>, dom: VNode) => VNode>>;
readonly renderFormItem: import("@antdv/pro-utils").VueTypeValidateDef<(text: any, props: Ref<ProFieldFCRenderProps>, dom: VNode) => VNode | null, import("@antdv/pro-utils").ValidatorFunction<(text: any, props: Ref<ProFieldFCRenderProps>, dom: VNode) => VNode | null>>;
readonly text: import("@antdv/pro-utils").VueTypeValidateDef<any, import("@antdv/pro-utils").ValidatorFunction<any>>;
readonly fieldProps: import("@antdv/pro-utils").VueTypeValidateDef<any, import("@antdv/pro-utils").ValidatorFunction<any>>;
readonly mode: import("@antdv/pro-utils").VueTypeValidateDef<import("@antdv/pro-utils").ProFieldFCMode, import("@antdv/pro-utils").ValidatorFunction<import("@antdv/pro-utils").ProFieldFCMode>>;
readonly plain: import("@antdv/pro-utils").VueTypeValidateDef<boolean, import("@antdv/pro-utils").ValidatorFunction<boolean>>;
readonly light: import("@antdv/pro-utils").VueTypeValidateDef<boolean, import("@antdv/pro-utils").ValidatorFunction<boolean>>;
readonly label: import("@antdv/pro-utils").VueTypeValidateDef<VueNode, import("@antdv/pro-utils").ValidatorFunction<VueNode>>;
readonly valueEnum: import("@antdv/pro-utils").VueTypeValidateDef<import("@antdv/pro-utils").ProSchemaValueEnumObj | import("@antdv/pro-utils").ProSchemaValueEnumMap, import("@antdv/pro-utils").ValidatorFunction<import("@antdv/pro-utils").ProSchemaValueEnumObj | import("@antdv/pro-utils").ProSchemaValueEnumMap>>;
readonly proFieldKey: import("@antdv/pro-utils").VueTypeDef<import("@antdv/pro-utils").Key>;
readonly readonly: import("@antdv/pro-utils").VueTypeValidateDef<boolean, import("@antdv/pro-utils").ValidatorFunction<boolean>>;
readonly onChange: import("@antdv/pro-utils").VueTypeValidateDef<(...rest: any[]) => void, import("@antdv/pro-utils").ValidatorFunction<(...rest: any[]) => void>>;
readonly value: import("@antdv/pro-utils").VueTypeDef<ProFieldTextType> & {
default: string | number | boolean | (() => void) | (() => VNode<import("vue").RendererNode, import("vue").RendererElement, {
[key: string]: any;
}>) | (() => import("@antdv/pro-utils").VNodeChildAtom[]) | (() => VNode<import("vue").RendererNode, import("vue").RendererElement, {
[key: string]: any;
}>) | (() => Record<string, any>) | (() => Record<string, any>[]) | null | undefined;
};
readonly valueType: import("@antdv/pro-utils").VueTypeDef<ProFieldValueType | ProFieldValueObjectType>;
}>, () => VNode<import("vue").RendererNode, import("vue").RendererElement, {
[key: string]: any;
}> | null, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
'update:value': (value: ProFieldTextType) => true;
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
readonly request: import("@antdv/pro-utils").VueTypeValidateDef<ProFieldRequestData, import("@antdv/pro-utils").ValidatorFunction<ProFieldRequestData>>;
readonly emptyText: import("@antdv/pro-utils").VueTypeValidateDef<VueNode, import("@antdv/pro-utils").ValidatorFunction<VueNode>>;
readonly open: import("@antdv/pro-utils").VueTypeValidateDef<boolean, import("@antdv/pro-utils").ValidatorFunction<boolean>>;
readonly onOpenChange: import("@antdv/pro-utils").VueTypeValidateDef<(open: boolean) => void, import("@antdv/pro-utils").ValidatorFunction<(open: boolean) => void>>;
readonly render: import("@antdv/pro-utils").VueTypeValidateDef<(text: any, props: Ref<Omit<ProFieldFCRenderProps, "value" | "onChange">>, dom: VNode) => VNode, import("@antdv/pro-utils").ValidatorFunction<(text: any, props: Ref<Omit<ProFieldFCRenderProps, "value" | "onChange">>, dom: VNode) => VNode>>;
readonly renderFormItem: import("@antdv/pro-utils").VueTypeValidateDef<(text: any, props: Ref<ProFieldFCRenderProps>, dom: VNode) => VNode | null, import("@antdv/pro-utils").ValidatorFunction<(text: any, props: Ref<ProFieldFCRenderProps>, dom: VNode) => VNode | null>>;
readonly text: import("@antdv/pro-utils").VueTypeValidateDef<any, import("@antdv/pro-utils").ValidatorFunction<any>>;
readonly fieldProps: import("@antdv/pro-utils").VueTypeValidateDef<any, import("@antdv/pro-utils").ValidatorFunction<any>>;
readonly mode: import("@antdv/pro-utils").VueTypeValidateDef<import("@antdv/pro-utils").ProFieldFCMode, import("@antdv/pro-utils").ValidatorFunction<import("@antdv/pro-utils").ProFieldFCMode>>;
readonly plain: import("@antdv/pro-utils").VueTypeValidateDef<boolean, import("@antdv/pro-utils").ValidatorFunction<boolean>>;
readonly light: import("@antdv/pro-utils").VueTypeValidateDef<boolean, import("@antdv/pro-utils").ValidatorFunction<boolean>>;
readonly label: import("@antdv/pro-utils").VueTypeValidateDef<VueNode, import("@antdv/pro-utils").ValidatorFunction<VueNode>>;
readonly valueEnum: import("@antdv/pro-utils").VueTypeValidateDef<import("@antdv/pro-utils").ProSchemaValueEnumObj | import("@antdv/pro-utils").ProSchemaValueEnumMap, import("@antdv/pro-utils").ValidatorFunction<import("@antdv/pro-utils").ProSchemaValueEnumObj | import("@antdv/pro-utils").ProSchemaValueEnumMap>>;
readonly proFieldKey: import("@antdv/pro-utils").VueTypeDef<import("@antdv/pro-utils").Key>;
readonly readonly: import("@antdv/pro-utils").VueTypeValidateDef<boolean, import("@antdv/pro-utils").ValidatorFunction<boolean>>;
readonly onChange: import("@antdv/pro-utils").VueTypeValidateDef<(...rest: any[]) => void, import("@antdv/pro-utils").ValidatorFunction<(...rest: any[]) => void>>;
readonly value: import("@antdv/pro-utils").VueTypeDef<ProFieldTextType> & {
default: string | number | boolean | (() => void) | (() => VNode<import("vue").RendererNode, import("vue").RendererElement, {
[key: string]: any;
}>) | (() => import("@antdv/pro-utils").VNodeChildAtom[]) | (() => VNode<import("vue").RendererNode, import("vue").RendererElement, {
[key: string]: any;
}>) | (() => Record<string, any>) | (() => Record<string, any>[]) | null | undefined;
};
readonly valueType: import("@antdv/pro-utils").VueTypeDef<ProFieldValueType | ProFieldValueObjectType>;
}>> & Readonly<{
"onUpdate:value"?: ((value?: ProFieldTextType) => any) | undefined;
}>, {
readonly value: ProFieldTextType;
}, SlotsType<{
default: () => VNode[];
emptyText: () => VNode[];
}>, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
export default _default;