@wetspace/pro-components
Version:
::: tip 基本介绍
413 lines (411 loc) • 22.5 kB
TypeScript
import { ExtractPropTypes, ComputedRef, Ref, VNode, Component } from 'vue';
import { ColProps, FormItemRule, DialogProps } from 'element-plus';
import { WetFormOption } from '../../types';
export declare const wetProFormProps: {
colProps: {
readonly type: import('vue').PropType<Partial<ColProps>>;
readonly required: false;
readonly validator: (val: unknown) => boolean;
__epPropKey: true;
};
span: import('element-plus/es/utils').EpPropFinalized<NumberConstructor, unknown, unknown, number, boolean>;
gutter: import('element-plus/es/utils').EpPropFinalized<NumberConstructor, unknown, unknown, number, boolean>;
clearable: {
readonly type: import('vue').PropType<import('element-plus/es/utils').EpPropMergeType<BooleanConstructor, unknown, unknown>>;
readonly required: false;
readonly validator: (val: unknown) => boolean;
__epPropKey: true;
};
disabled: BooleanConstructor;
initialValues: {
readonly type: import('vue').PropType<Record<string, any>>;
readonly required: false;
readonly validator: (val: unknown) => boolean;
__epPropKey: true;
};
valueEmptyModel: import('element-plus/es/utils').EpPropFinalized<import('vue').PropType<"filter" | "null">, unknown, unknown, string, boolean>;
labelWidth: import('element-plus/es/utils').EpPropFinalized<readonly [StringConstructor, NumberConstructor], unknown, unknown, "", boolean>;
isFormItem: BooleanConstructor;
modelValue: ObjectConstructor;
prop: {
readonly type: import('vue').PropType<import('element-plus/es/utils').EpPropMergeType<import('vue').PropType<string | string[]>, unknown, unknown>>;
readonly required: false;
readonly validator: (val: unknown) => boolean;
__epPropKey: true;
};
notInitClearValidate: BooleanConstructor;
labelPosition: {
readonly type: import('vue').PropType<import('element-plus/es/utils').EpPropMergeType<import('vue').PropType<"" | "top" | "right" | "left">, unknown, unknown>>;
readonly required: false;
readonly validator: (val: unknown) => boolean;
__epPropKey: true;
};
};
export type WetProFormPropsType = ExtractPropTypes<typeof wetProFormProps>;
export declare const wetModalFormProps: {
title: StringConstructor;
destroyOnClose: BooleanConstructor;
modalProps: {
readonly type: import('vue').PropType<Partial<DialogProps>>;
readonly required: false;
readonly validator: (val: unknown) => boolean;
__epPropKey: true;
};
onFinish: {
readonly type: import('vue').PropType<(v: any) => Promise<boolean>>;
readonly required: false;
readonly validator: (val: unknown) => boolean;
__epPropKey: true;
};
onCancel: import('element-plus/es/utils').EpPropFinalized<import('vue').PropType<() => Promise<boolean>>, unknown, unknown, () => Promise<boolean>, boolean>;
colProps: {
readonly type: import('vue').PropType<Partial<ColProps>>;
readonly required: false;
readonly validator: (val: unknown) => boolean;
__epPropKey: true;
};
span: import('element-plus/es/utils').EpPropFinalized<NumberConstructor, unknown, unknown, number, boolean>;
gutter: import('element-plus/es/utils').EpPropFinalized<NumberConstructor, unknown, unknown, number, boolean>;
clearable: {
readonly type: import('vue').PropType<import('element-plus/es/utils').EpPropMergeType<BooleanConstructor, unknown, unknown>>;
readonly required: false;
readonly validator: (val: unknown) => boolean;
__epPropKey: true;
};
disabled: BooleanConstructor;
initialValues: {
readonly type: import('vue').PropType<Record<string, any>>;
readonly required: false;
readonly validator: (val: unknown) => boolean;
__epPropKey: true;
};
valueEmptyModel: import('element-plus/es/utils').EpPropFinalized<import('vue').PropType<"filter" | "null">, unknown, unknown, string, boolean>;
labelWidth: import('element-plus/es/utils').EpPropFinalized<readonly [StringConstructor, NumberConstructor], unknown, unknown, "", boolean>;
isFormItem: BooleanConstructor;
modelValue: ObjectConstructor;
prop: {
readonly type: import('vue').PropType<import('element-plus/es/utils').EpPropMergeType<import('vue').PropType<string | string[]>, unknown, unknown>>;
readonly required: false;
readonly validator: (val: unknown) => boolean;
__epPropKey: true;
};
notInitClearValidate: BooleanConstructor;
labelPosition: {
readonly type: import('vue').PropType<import('element-plus/es/utils').EpPropMergeType<import('vue').PropType<"" | "top" | "right" | "left">, unknown, unknown>>;
readonly required: false;
readonly validator: (val: unknown) => boolean;
__epPropKey: true;
};
};
export declare const wetDrawerFormProps: {
title: StringConstructor;
destroyOnClose: BooleanConstructor;
drawerProps: {
readonly type: import('vue').PropType<Partial<DialogProps>>;
readonly required: false;
readonly validator: (val: unknown) => boolean;
__epPropKey: true;
};
onFinish: {
readonly type: import('vue').PropType<(v: any) => Promise<boolean>>;
readonly required: false;
readonly validator: (val: unknown) => boolean;
__epPropKey: true;
};
onCancel: import('element-plus/es/utils').EpPropFinalized<import('vue').PropType<() => Promise<boolean>>, unknown, unknown, () => Promise<boolean>, boolean>;
colProps: {
readonly type: import('vue').PropType<Partial<ColProps>>;
readonly required: false;
readonly validator: (val: unknown) => boolean;
__epPropKey: true;
};
span: import('element-plus/es/utils').EpPropFinalized<NumberConstructor, unknown, unknown, number, boolean>;
gutter: import('element-plus/es/utils').EpPropFinalized<NumberConstructor, unknown, unknown, number, boolean>;
clearable: {
readonly type: import('vue').PropType<import('element-plus/es/utils').EpPropMergeType<BooleanConstructor, unknown, unknown>>;
readonly required: false;
readonly validator: (val: unknown) => boolean;
__epPropKey: true;
};
disabled: BooleanConstructor;
initialValues: {
readonly type: import('vue').PropType<Record<string, any>>;
readonly required: false;
readonly validator: (val: unknown) => boolean;
__epPropKey: true;
};
valueEmptyModel: import('element-plus/es/utils').EpPropFinalized<import('vue').PropType<"filter" | "null">, unknown, unknown, string, boolean>;
labelWidth: import('element-plus/es/utils').EpPropFinalized<readonly [StringConstructor, NumberConstructor], unknown, unknown, "", boolean>;
isFormItem: BooleanConstructor;
modelValue: ObjectConstructor;
prop: {
readonly type: import('vue').PropType<import('element-plus/es/utils').EpPropMergeType<import('vue').PropType<string | string[]>, unknown, unknown>>;
readonly required: false;
readonly validator: (val: unknown) => boolean;
__epPropKey: true;
};
notInitClearValidate: BooleanConstructor;
labelPosition: {
readonly type: import('vue').PropType<import('element-plus/es/utils').EpPropMergeType<import('vue').PropType<"" | "top" | "right" | "left">, unknown, unknown>>;
readonly required: false;
readonly validator: (val: unknown) => boolean;
__epPropKey: true;
};
};
export declare const wetProFormItemProps: {
rules: import('element-plus/es/utils').EpPropFinalized<import('vue').PropType<FormItemRule[]>, unknown, unknown, () => any[], boolean>;
span: {
readonly type: import('vue').PropType<number>;
readonly required: false;
readonly validator: (val: unknown) => boolean;
__epPropKey: true;
};
title: StringConstructor;
noStyle: BooleanConstructor;
description: StringConstructor;
labelColor: StringConstructor;
fixedWidth: BooleanConstructor;
isAction: BooleanConstructor;
formInputProps: ObjectConstructor;
dependency: ObjectConstructor;
label: StringConstructor;
labelWidth: import('element-plus/es/utils').EpPropFinalized<readonly [StringConstructor, NumberConstructor], unknown, unknown, "", boolean>;
labelPosition: import('element-plus/es/utils').EpPropFinalized<StringConstructor, "" | "top" | "right" | "left", unknown, "", boolean>;
prop: {
readonly type: import('vue').PropType<import('element-plus/es/utils').EpPropMergeType<(new (...args: any[]) => string | string[]) | (() => import('element-plus').FormItemProp) | ((new (...args: any[]) => string | string[]) | (() => import('element-plus').FormItemProp))[], unknown, unknown>>;
readonly required: false;
readonly validator: (val: unknown) => boolean;
__epPropKey: true;
};
required: import('element-plus/es/utils').EpPropFinalized<BooleanConstructor, unknown, unknown, undefined, boolean>;
error: StringConstructor;
validateStatus: {
readonly type: import('vue').PropType<import('element-plus/es/utils').EpPropMergeType<StringConstructor, "" | "success" | "error" | "validating", unknown>>;
readonly required: false;
readonly validator: (val: unknown) => boolean;
__epPropKey: true;
};
for: StringConstructor;
inlineMessage: import('element-plus/es/utils').EpPropFinalized<readonly [StringConstructor, BooleanConstructor], unknown, unknown, "", boolean>;
showMessage: import('element-plus/es/utils').EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
size: {
readonly type: import('vue').PropType<import('element-plus/es/utils').EpPropMergeType<StringConstructor, "" | "default" | "small" | "large", unknown>>;
readonly required: false;
readonly validator: (val: unknown) => boolean;
__epPropKey: true;
};
tag: import('element-plus/es/utils').EpPropFinalized<StringConstructor, unknown, unknown, "div", boolean>;
offset: import('element-plus/es/utils').EpPropFinalized<NumberConstructor, unknown, unknown, 0, boolean>;
pull: import('element-plus/es/utils').EpPropFinalized<NumberConstructor, unknown, unknown, 0, boolean>;
push: import('element-plus/es/utils').EpPropFinalized<NumberConstructor, unknown, unknown, 0, boolean>;
xs: import('element-plus/es/utils').EpPropFinalized<(new (...args: any[]) => number | import('element-plus').ColSizeObject) | (() => import('element-plus').ColSize) | ((new (...args: any[]) => number | import('element-plus').ColSizeObject) | (() => import('element-plus').ColSize))[], unknown, unknown, () => import('element-plus/es/utils').Mutable<{}>, boolean>;
sm: import('element-plus/es/utils').EpPropFinalized<(new (...args: any[]) => number | import('element-plus').ColSizeObject) | (() => import('element-plus').ColSize) | ((new (...args: any[]) => number | import('element-plus').ColSizeObject) | (() => import('element-plus').ColSize))[], unknown, unknown, () => import('element-plus/es/utils').Mutable<{}>, boolean>;
md: import('element-plus/es/utils').EpPropFinalized<(new (...args: any[]) => number | import('element-plus').ColSizeObject) | (() => import('element-plus').ColSize) | ((new (...args: any[]) => number | import('element-plus').ColSizeObject) | (() => import('element-plus').ColSize))[], unknown, unknown, () => import('element-plus/es/utils').Mutable<{}>, boolean>;
lg: import('element-plus/es/utils').EpPropFinalized<(new (...args: any[]) => number | import('element-plus').ColSizeObject) | (() => import('element-plus').ColSize) | ((new (...args: any[]) => number | import('element-plus').ColSizeObject) | (() => import('element-plus').ColSize))[], unknown, unknown, () => import('element-plus/es/utils').Mutable<{}>, boolean>;
xl: import('element-plus/es/utils').EpPropFinalized<(new (...args: any[]) => number | import('element-plus').ColSizeObject) | (() => import('element-plus').ColSize) | ((new (...args: any[]) => number | import('element-plus').ColSizeObject) | (() => import('element-plus').ColSize))[], unknown, unknown, () => import('element-plus/es/utils').Mutable<{}>, boolean>;
};
export type WetProFormItemProps = ExtractPropTypes<typeof wetProFormItemProps>;
type DependencyChangeType = (p: {
relyValues: any | any[];
setValue: (p: string | string[], v: any) => void;
getValue: (prop?: string | string[]) => void;
}) => Partial<WetSchemaItemType> | void;
export declare const wetFormItemDependencyProps: {
relyprops: import('element-plus/es/utils').EpPropFinalized<import('vue').PropType<string[] | (string | string[])[]>, unknown, unknown, () => any[], boolean>;
dependencyChange: {
readonly type: import('vue').PropType<DependencyChangeType>;
readonly required: false;
readonly validator: (val: unknown) => boolean;
__epPropKey: true;
};
};
export type WetFormItemDependencyProps = ExtractPropTypes<typeof wetFormItemDependencyProps>;
export declare const wetProFormListProps: {
prop: {
readonly type: import('vue').PropType<import('element-plus/es/utils').EpPropMergeType<import('vue').PropType<string | string[]>, unknown, unknown>>;
readonly required: false;
readonly validator: (val: unknown) => boolean;
__epPropKey: true;
};
};
export type WetProFormProvideType = {
registerFiledsPaths: Ref<Record<string, boolean>>;
formState: Ref<Record<string, any>>;
setFormStateValue: (path: string[]) => void;
registerChangeEmit: (key: string | string[]) => void;
globalColProps: ComputedRef<Partial<ColProps> | undefined>;
clearable: ComputedRef<boolean | undefined>;
labelWidth: ComputedRef<number | string | undefined>;
setFieldsValue: (prop: string | string[], v: any) => void;
getFieldsValue: (prop?: string | string[]) => void;
labelPosition: ComputedRef<"" | "top" | "left" | "right">;
};
export type WetValueType = 'text' | 'date' | 'checkbox' | 'radio' | 'switch' | 'slider' | 'rate' | 'select' | 'tree-select' | 'number' | 'autocomplete' | 'color' | 'cascader' | 'time-picker' | 'time-select' | 'array';
export type WetSchemaItemType = {
valueType?: WetValueType;
property: string | string[];
title?: string;
valueEnum?: WetFormOption[];
hideInForm?: boolean;
hideInRender?: boolean;
renderFormItem?: VNode | Component;
formInputProps?: Record<string, any>;
dependency?: WetFormItemDependencyProps;
} & Partial<WetProFormItemProps>;
export declare const wetSchemaProps: {
properties: import('element-plus/es/utils').EpPropFinalized<import('vue').PropType<WetSchemaItemType[]>, unknown, unknown, () => any[], boolean>;
colProps: {
readonly type: import('vue').PropType<Partial<ColProps>>;
readonly required: false;
readonly validator: (val: unknown) => boolean;
__epPropKey: true;
};
span: import('element-plus/es/utils').EpPropFinalized<NumberConstructor, unknown, unknown, number, boolean>;
gutter: import('element-plus/es/utils').EpPropFinalized<NumberConstructor, unknown, unknown, number, boolean>;
clearable: {
readonly type: import('vue').PropType<import('element-plus/es/utils').EpPropMergeType<BooleanConstructor, unknown, unknown>>;
readonly required: false;
readonly validator: (val: unknown) => boolean;
__epPropKey: true;
};
disabled: BooleanConstructor;
initialValues: {
readonly type: import('vue').PropType<Record<string, any>>;
readonly required: false;
readonly validator: (val: unknown) => boolean;
__epPropKey: true;
};
valueEmptyModel: import('element-plus/es/utils').EpPropFinalized<import('vue').PropType<"filter" | "null">, unknown, unknown, string, boolean>;
labelWidth: import('element-plus/es/utils').EpPropFinalized<readonly [StringConstructor, NumberConstructor], unknown, unknown, "", boolean>;
isFormItem: BooleanConstructor;
modelValue: ObjectConstructor;
prop: {
readonly type: import('vue').PropType<import('element-plus/es/utils').EpPropMergeType<import('vue').PropType<string | string[]>, unknown, unknown>>;
readonly required: false;
readonly validator: (val: unknown) => boolean;
__epPropKey: true;
};
notInitClearValidate: BooleanConstructor;
labelPosition: {
readonly type: import('vue').PropType<import('element-plus/es/utils').EpPropMergeType<import('vue').PropType<"" | "top" | "right" | "left">, unknown, unknown>>;
readonly required: false;
readonly validator: (val: unknown) => boolean;
__epPropKey: true;
};
};
export type WetSchemaProps = ExtractPropTypes<typeof wetSchemaProps>;
export declare const wetSetpsFormProps: {
bodyClass: {
readonly type: import('vue').PropType<Record<string, string>>;
readonly required: false;
readonly validator: (val: unknown) => boolean;
__epPropKey: true;
};
contentWidth: {
readonly type: import('vue').PropType<import('element-plus/es/utils').EpPropMergeType<import('vue').PropType<string | number>, unknown, unknown>>;
readonly required: false;
readonly validator: (val: unknown) => boolean;
__epPropKey: true;
};
space: import('element-plus/es/utils').EpPropFinalized<readonly [NumberConstructor, StringConstructor], unknown, unknown, "", boolean>;
active: import('element-plus/es/utils').EpPropFinalized<NumberConstructor, unknown, unknown, 0, boolean>;
direction: import('element-plus/es/utils').EpPropFinalized<StringConstructor, "horizontal" | "vertical", unknown, "horizontal", boolean>;
alignCenter: {
readonly type: import('vue').PropType<import('element-plus/es/utils').EpPropMergeType<BooleanConstructor, unknown, unknown>>;
readonly required: false;
readonly validator: (val: unknown) => boolean;
__epPropKey: true;
};
simple: {
readonly type: import('vue').PropType<import('element-plus/es/utils').EpPropMergeType<BooleanConstructor, unknown, unknown>>;
readonly required: false;
readonly validator: (val: unknown) => boolean;
__epPropKey: true;
};
finishStatus: import('element-plus/es/utils').EpPropFinalized<StringConstructor, "success" | "error" | "wait" | "finish" | "process", unknown, "finish", boolean>;
processStatus: import('element-plus/es/utils').EpPropFinalized<StringConstructor, "success" | "error" | "wait" | "finish" | "process", unknown, "process", boolean>;
};
export declare const wetQeuryformProps: {
span: import('element-plus/es/utils').EpPropFinalized<import('vue').PropType<number>, unknown, unknown, number, boolean>;
showCollapse: import('element-plus/es/utils').EpPropFinalized<import('vue').PropType<boolean>, unknown, unknown, boolean, boolean>;
collapseShowNum: {
readonly type: import('vue').PropType<number>;
readonly required: false;
readonly validator: (val: unknown) => boolean;
__epPropKey: true;
};
properties: import('element-plus/es/utils').EpPropFinalized<import('vue').PropType<WetSchemaItemType[]>, unknown, unknown, () => any[], boolean>;
colProps: {
readonly type: import('vue').PropType<Partial<ColProps>>;
readonly required: false;
readonly validator: (val: unknown) => boolean;
__epPropKey: true;
};
gutter: import('element-plus/es/utils').EpPropFinalized<NumberConstructor, unknown, unknown, number, boolean>;
clearable: {
readonly type: import('vue').PropType<import('element-plus/es/utils').EpPropMergeType<BooleanConstructor, unknown, unknown>>;
readonly required: false;
readonly validator: (val: unknown) => boolean;
__epPropKey: true;
};
disabled: BooleanConstructor;
initialValues: {
readonly type: import('vue').PropType<Record<string, any>>;
readonly required: false;
readonly validator: (val: unknown) => boolean;
__epPropKey: true;
};
valueEmptyModel: import('element-plus/es/utils').EpPropFinalized<import('vue').PropType<"filter" | "null">, unknown, unknown, string, boolean>;
labelWidth: import('element-plus/es/utils').EpPropFinalized<readonly [StringConstructor, NumberConstructor], unknown, unknown, "", boolean>;
isFormItem: BooleanConstructor;
modelValue: ObjectConstructor;
prop: {
readonly type: import('vue').PropType<import('element-plus/es/utils').EpPropMergeType<import('vue').PropType<string | string[]>, unknown, unknown>>;
readonly required: false;
readonly validator: (val: unknown) => boolean;
__epPropKey: true;
};
notInitClearValidate: BooleanConstructor;
labelPosition: {
readonly type: import('vue').PropType<import('element-plus/es/utils').EpPropMergeType<import('vue').PropType<"" | "top" | "right" | "left">, unknown, unknown>>;
readonly required: false;
readonly validator: (val: unknown) => boolean;
__epPropKey: true;
};
};
export type WetQeuryformPropsType = ExtractPropTypes<typeof wetQeuryformProps>;
export type WetConditionType = {
label: string;
property: string;
valueType?: WetValueType;
opreator: string[];
formInputProps?: any;
};
export type WetConditionValueType = {
property: string;
opreator: string;
value: any;
};
export declare const wetConditionFliterFormProps: {
modelValue: {
readonly type: import('vue').PropType<WetConditionValueType[]>;
readonly required: false;
readonly validator: (val: unknown) => boolean;
__epPropKey: true;
};
condition: {
readonly type: import('vue').PropType<WetConditionType[]>;
readonly required: false;
readonly validator: (val: unknown) => boolean;
__epPropKey: true;
};
conjunction: import('element-plus/es/utils').EpPropFinalized<StringConstructor, unknown, unknown, string, boolean>;
opreatorsMap: import('element-plus/es/utils').EpPropFinalized<import('vue').PropType<Record<string, string>>, unknown, unknown, () => {
equal: string;
like: string;
'not like': string;
in: string;
between: string;
}, boolean>;
};
export {};