UNPKG

@vtj/designer

Version:

VTJ 是一款基于 Vue3 + Typescript 的低代码页面可视化设计器。内置低代码引擎、渲染器和代码生成器,面向前端开发者,开箱即用。 无缝嵌入本地开发工程,不改变前端开发流程和编码习惯。

774 lines (773 loc) 45.4 kB
import { Context } from '@vtj/renderer'; import { BlockModel } from '@vtj/core'; import { ComponentInternalInstance, VNodeProps, AllowedComponentProps, ComponentCustomProps, Slot, ComponentPublicInstance, ComponentOptionsBase, ExtractPropTypes, PropType, ComponentOptionsMixin, GlobalComponents, GlobalDirectives, ComponentProvideOptions, DebuggerEvent, WatchOptions, WatchStopHandle, ShallowUnwrapRef, ComponentCustomProperties, Ref, nextTick, DefineComponent, PublicProps } from 'vue'; import { ElTooltipProps, FormItemRule, FormItemProp, FormValidateCallback, FormValidationResult, FormItemContext } from 'element-plus'; import { FormModel } from '@vtj/ui'; import { EpPropMergeType, EpPropFinalized } from 'element-plus/es/utils/index.mjs'; import { Arrayable } from 'element-plus/es/utils/typescript.mjs'; import { OnCleanup } from '@vue/reactivity'; export interface Props { title: string; context: Context | null; block: BlockModel | null; model?: Record<string, any>; rules?: Record<string, any>; modelValue?: boolean; submitMethod?: (model: Record<string, any>) => Promise<boolean>; unbindEnabled?: boolean; } declare function __VLS_template(): { attrs: Partial<{}>; slots: { default?(_: {}): any; }; refs: { formRef: ({ $: ComponentInternalInstance; $data: {}; $props: Partial<{ footer: boolean; inline: boolean; tooltipMessage: boolean | Partial< ElTooltipProps>; model: Record<string, any>; submitText: string | null; resetText: string | null; enterSubmit: boolean; }> & Omit<{ readonly footer: boolean; readonly inline: boolean; readonly submitText: string | null; readonly resetText: string | null; readonly enterSubmit: boolean; readonly model?: Record<string, any> | undefined; readonly submitMethod?: ((model: FormModel) => Promise<any>) | undefined; readonly tooltipMessage?: boolean | Partial< ElTooltipProps> | undefined; readonly inlineColumns?: number | undefined; readonly onReset?: (() => any) | undefined | undefined; readonly onSubmit?: ((model: Record<string, any>) => any) | undefined | undefined; readonly onChange?: ((model: Record<string, any>) => any) | undefined | undefined; } & VNodeProps & AllowedComponentProps & ComponentCustomProps, "footer" | "model" | "tooltipMessage" | "inline" | "submitText" | "resetText" | "enterSubmit">; $attrs: { [x: string]: unknown; }; $refs: { [x: string]: unknown; } & { formRef: ({ $: ComponentInternalInstance; $data: {}; $props: Partial<{ readonly disabled: boolean; readonly inline: boolean; readonly labelWidth: EpPropMergeType<readonly [StringConstructor, NumberConstructor], unknown, unknown>; readonly labelPosition: EpPropMergeType<StringConstructor, "top" | "left" | "right", unknown>; readonly inlineMessage: boolean; readonly showMessage: EpPropMergeType<BooleanConstructor, unknown, unknown>; readonly requireAsteriskPosition: EpPropMergeType<StringConstructor, "left" | "right", unknown>; readonly labelSuffix: string; readonly validateOnRuleChange: EpPropMergeType<BooleanConstructor, unknown, unknown>; readonly statusIcon: boolean; readonly hideRequiredAsterisk: boolean; readonly scrollToError: boolean; }> & Omit<{ readonly disabled: boolean; readonly inline: boolean; readonly labelWidth: EpPropMergeType<readonly [StringConstructor, NumberConstructor], unknown, unknown>; readonly labelPosition: EpPropMergeType<StringConstructor, "top" | "left" | "right", unknown>; readonly inlineMessage: boolean; readonly showMessage: EpPropMergeType<BooleanConstructor, unknown, unknown>; readonly requireAsteriskPosition: EpPropMergeType<StringConstructor, "left" | "right", unknown>; readonly labelSuffix: string; readonly statusIcon: boolean; readonly validateOnRuleChange: EpPropMergeType<BooleanConstructor, unknown, unknown>; readonly hideRequiredAsterisk: boolean; readonly scrollToError: boolean; readonly size?: EpPropMergeType<StringConstructor, "" | "large" | "default" | "small", unknown> | undefined; readonly rules?: Partial<Record<string, Arrayable<FormItemRule>>> | undefined; readonly model?: Record<string, any> | undefined; readonly scrollIntoViewOptions?: EpPropMergeType<readonly [ObjectConstructor, BooleanConstructor], unknown, unknown> | undefined; onValidate?: ((prop: FormItemProp, isValid: boolean, message: string) => any) | undefined | undefined; } & VNodeProps & AllowedComponentProps & ComponentCustomProps, "disabled" | "inline" | "labelWidth" | "labelPosition" | "inlineMessage" | "showMessage" | "requireAsteriskPosition" | "labelSuffix" | "statusIcon" | "validateOnRuleChange" | "hideRequiredAsterisk" | "scrollToError">; $attrs: { [x: string]: unknown; }; $refs: { [x: string]: unknown; }; $slots: Readonly<{ [name: string]: Slot<any> | undefined; }>; $root: ComponentPublicInstance | null; $parent: ComponentPublicInstance | null; $host: Element | null; $emit: (event: "validate", prop: FormItemProp, isValid: boolean, message: string) => void; $el: any; $options: ComponentOptionsBase<Readonly< ExtractPropTypes<{ readonly model: ObjectConstructor; readonly rules: { readonly type: PropType<Partial<Record<string, Arrayable<FormItemRule>>>>; readonly required: false; readonly validator: ((val: unknown) => boolean) | undefined; __epPropKey: true; }; readonly labelPosition: EpPropFinalized<StringConstructor, "top" | "left" | "right", unknown, "right", boolean>; readonly requireAsteriskPosition: EpPropFinalized<StringConstructor, "left" | "right", unknown, "left", boolean>; readonly labelWidth: EpPropFinalized<readonly [StringConstructor, NumberConstructor], unknown, unknown, "", boolean>; readonly labelSuffix: EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>; readonly inline: BooleanConstructor; readonly inlineMessage: BooleanConstructor; readonly statusIcon: BooleanConstructor; readonly showMessage: EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>; readonly validateOnRuleChange: EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>; readonly hideRequiredAsterisk: BooleanConstructor; readonly scrollToError: BooleanConstructor; readonly scrollIntoViewOptions: { readonly type: PropType<EpPropMergeType<readonly [ObjectConstructor, BooleanConstructor], unknown, unknown>>; readonly required: false; readonly validator: ((val: unknown) => boolean) | undefined; __epPropKey: true; }; readonly size: { readonly type: PropType<EpPropMergeType<StringConstructor, "" | "small" | "default" | "large", unknown>>; readonly required: false; readonly validator: ((val: unknown) => boolean) | undefined; __epPropKey: true; }; readonly disabled: BooleanConstructor; }>> & { onValidate?: ((prop: FormItemProp, isValid: boolean, message: string) => any) | undefined; }, { validate: (callback?: FormValidateCallback) => FormValidationResult; validateField: (props?: Arrayable<FormItemProp>, callback?: FormValidateCallback) => FormValidationResult; resetFields: (props?: Arrayable<FormItemProp>) => void; clearValidate: (props?: Arrayable<FormItemProp>) => void; scrollToField: (prop: FormItemProp) => void; fields: FormItemContext[]; }, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, { validate: (prop: FormItemProp, isValid: boolean, message: string) => void; }, string, { readonly disabled: boolean; readonly inline: boolean; readonly labelWidth: EpPropMergeType<readonly [StringConstructor, NumberConstructor], unknown, unknown>; readonly labelPosition: EpPropMergeType<StringConstructor, "top" | "left" | "right", unknown>; readonly inlineMessage: boolean; readonly showMessage: EpPropMergeType<BooleanConstructor, unknown, unknown>; readonly requireAsteriskPosition: EpPropMergeType<StringConstructor, "left" | "right", unknown>; readonly labelSuffix: string; readonly validateOnRuleChange: EpPropMergeType<BooleanConstructor, unknown, unknown>; readonly statusIcon: boolean; readonly hideRequiredAsterisk: boolean; readonly scrollToError: boolean; }, {}, string, {}, GlobalComponents, GlobalDirectives, string, ComponentProvideOptions> & { beforeCreate?: (() => void) | (() => void)[]; created?: (() => void) | (() => void)[]; beforeMount?: (() => void) | (() => void)[]; mounted?: (() => void) | (() => void)[]; beforeUpdate?: (() => void) | (() => void)[]; updated?: (() => void) | (() => void)[]; activated?: (() => void) | (() => void)[]; deactivated?: (() => void) | (() => void)[]; beforeDestroy?: (() => void) | (() => void)[]; beforeUnmount?: (() => void) | (() => void)[]; destroyed?: (() => void) | (() => void)[]; unmounted?: (() => void) | (() => void)[]; renderTracked?: ((e: DebuggerEvent) => void) | ((e: DebuggerEvent) => void)[]; renderTriggered?: ((e: DebuggerEvent) => void) | ((e: DebuggerEvent) => void)[]; errorCaptured?: ((err: unknown, instance: ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: ComponentPublicInstance | null, info: string) => boolean | void)[]; }; $forceUpdate: () => void; $nextTick: nextTick; $watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, OnCleanup]) => any : (...args: [any, any, OnCleanup]) => any, options?: WatchOptions): WatchStopHandle; } & Readonly<{ readonly disabled: boolean; readonly inline: boolean; readonly labelWidth: EpPropMergeType<readonly [StringConstructor, NumberConstructor], unknown, unknown>; readonly labelPosition: EpPropMergeType<StringConstructor, "top" | "left" | "right", unknown>; readonly inlineMessage: boolean; readonly showMessage: EpPropMergeType<BooleanConstructor, unknown, unknown>; readonly requireAsteriskPosition: EpPropMergeType<StringConstructor, "left" | "right", unknown>; readonly labelSuffix: string; readonly validateOnRuleChange: EpPropMergeType<BooleanConstructor, unknown, unknown>; readonly statusIcon: boolean; readonly hideRequiredAsterisk: boolean; readonly scrollToError: boolean; }> & Omit<Readonly< ExtractPropTypes<{ readonly model: ObjectConstructor; readonly rules: { readonly type: PropType<Partial<Record<string, Arrayable<FormItemRule>>>>; readonly required: false; readonly validator: ((val: unknown) => boolean) | undefined; __epPropKey: true; }; readonly labelPosition: EpPropFinalized<StringConstructor, "top" | "left" | "right", unknown, "right", boolean>; readonly requireAsteriskPosition: EpPropFinalized<StringConstructor, "left" | "right", unknown, "left", boolean>; readonly labelWidth: EpPropFinalized<readonly [StringConstructor, NumberConstructor], unknown, unknown, "", boolean>; readonly labelSuffix: EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>; readonly inline: BooleanConstructor; readonly inlineMessage: BooleanConstructor; readonly statusIcon: BooleanConstructor; readonly showMessage: EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>; readonly validateOnRuleChange: EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>; readonly hideRequiredAsterisk: BooleanConstructor; readonly scrollToError: BooleanConstructor; readonly scrollIntoViewOptions: { readonly type: PropType<EpPropMergeType<readonly [ObjectConstructor, BooleanConstructor], unknown, unknown>>; readonly required: false; readonly validator: ((val: unknown) => boolean) | undefined; __epPropKey: true; }; readonly size: { readonly type: PropType<EpPropMergeType<StringConstructor, "" | "small" | "default" | "large", unknown>>; readonly required: false; readonly validator: ((val: unknown) => boolean) | undefined; __epPropKey: true; }; readonly disabled: BooleanConstructor; }>> & { onValidate?: ((prop: FormItemProp, isValid: boolean, message: string) => any) | undefined; }, "disabled" | "inline" | "clearValidate" | "validate" | "labelWidth" | "labelPosition" | "inlineMessage" | "showMessage" | "fields" | "requireAsteriskPosition" | "labelSuffix" | "statusIcon" | "validateOnRuleChange" | "hideRequiredAsterisk" | "scrollToError" | "validateField" | "resetFields" | "scrollToField"> & ShallowUnwrapRef<{ validate: (callback?: FormValidateCallback) => FormValidationResult; validateField: (props?: Arrayable<FormItemProp>, callback?: FormValidateCallback) => FormValidationResult; resetFields: (props?: Arrayable<FormItemProp>) => void; clearValidate: (props?: Arrayable<FormItemProp>) => void; scrollToField: (prop: FormItemProp) => void; fields: FormItemContext[]; }> & {} & ComponentCustomProperties & {} & { $slots: { default?(_: {}): any; }; }) | null; }; $slots: Readonly<{ [name: string]: Slot<any> | undefined; }>; $root: ComponentPublicInstance | null; $parent: ComponentPublicInstance | null; $host: Element | null; $emit: ((event: "reset") => void) & ((event: "submit", model: Record<string, any>) => void) & ((event: "change", model: Record<string, any>) => void); $el: any; $options: ComponentOptionsBase<Readonly< ExtractPropTypes<{ model: { type: PropType<Record<string, any>>; default(): any; }; inline: { type: BooleanConstructor; }; inlineColumns: { type: NumberConstructor; }; footer: { type: BooleanConstructor; default: boolean; }; submitText: { type: PropType<string | null>; default: string; }; resetText: { type: PropType<string | null>; default: string; }; submitMethod: { type: PropType<(model: FormModel) => Promise<any>>; }; tooltipMessage: { type: PropType<boolean | Partial< ElTooltipProps>>; default: undefined; }; enterSubmit: { type: BooleanConstructor; default: boolean; }; }>> & Readonly<{ onReset?: (() => any) | undefined; onSubmit?: ((model: Record<string, any>) => any) | undefined; onChange?: ((model: Record<string, any>) => any) | undefined; }>, { formRef: Ref<any, any>; model: FormModel; submit: () => Promise<void>; reset: (fields?: string[] | string) => void; validate: () => Promise<any>; clearValidate: () => void; }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, { reset: () => any; submit: (model: Record<string, any>) => any; change: (model: Record<string, any>) => any; }, string, { footer: boolean; inline: boolean; tooltipMessage: boolean | Partial< ElTooltipProps>; model: Record<string, any>; submitText: string | null; resetText: string | null; enterSubmit: boolean; }, {}, string, {}, GlobalComponents, GlobalDirectives, string, ComponentProvideOptions> & { beforeCreate?: (() => void) | (() => void)[]; created?: (() => void) | (() => void)[]; beforeMount?: (() => void) | (() => void)[]; mounted?: (() => void) | (() => void)[]; beforeUpdate?: (() => void) | (() => void)[]; updated?: (() => void) | (() => void)[]; activated?: (() => void) | (() => void)[]; deactivated?: (() => void) | (() => void)[]; beforeDestroy?: (() => void) | (() => void)[]; beforeUnmount?: (() => void) | (() => void)[]; destroyed?: (() => void) | (() => void)[]; unmounted?: (() => void) | (() => void)[]; renderTracked?: ((e: DebuggerEvent) => void) | ((e: DebuggerEvent) => void)[]; renderTriggered?: ((e: DebuggerEvent) => void) | ((e: DebuggerEvent) => void)[]; errorCaptured?: ((err: unknown, instance: ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: ComponentPublicInstance | null, info: string) => boolean | void)[]; }; $forceUpdate: () => void; $nextTick: nextTick; $watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, OnCleanup]) => any : (...args: [any, any, OnCleanup]) => any, options?: WatchOptions): WatchStopHandle; } & Readonly<{ footer: boolean; inline: boolean; tooltipMessage: boolean | Partial< ElTooltipProps>; model: Record<string, any>; submitText: string | null; resetText: string | null; enterSubmit: boolean; }> & Omit<Readonly< ExtractPropTypes<{ model: { type: PropType<Record<string, any>>; default(): any; }; inline: { type: BooleanConstructor; }; inlineColumns: { type: NumberConstructor; }; footer: { type: BooleanConstructor; default: boolean; }; submitText: { type: PropType<string | null>; default: string; }; resetText: { type: PropType<string | null>; default: string; }; submitMethod: { type: PropType<(model: FormModel) => Promise<any>>; }; tooltipMessage: { type: PropType<boolean | Partial< ElTooltipProps>>; default: undefined; }; enterSubmit: { type: BooleanConstructor; default: boolean; }; }>> & Readonly<{ onReset?: (() => any) | undefined; onSubmit?: ((model: Record<string, any>) => any) | undefined; onChange?: ((model: Record<string, any>) => any) | undefined; }>, "footer" | "reset" | "submit" | "model" | "formRef" | "tooltipMessage" | "inline" | "submitText" | "resetText" | "enterSubmit" | "validate" | "clearValidate"> & ShallowUnwrapRef<{ formRef: Ref<any, any>; model: FormModel; submit: () => Promise<void>; reset: (fields?: string[] | string) => void; validate: () => Promise<any>; clearValidate: () => void; }> & {} & ComponentCustomProperties & {} & { $slots: { default?(_: {}): any; footer?(_: {}): any; action?(_: {}): any; }; }) | null; }; rootEl: any; }; type __VLS_TemplateResult = ReturnType<typeof __VLS_template>; declare const __VLS_component: DefineComponent<Props, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, { close: (...args: any[]) => void; cancel: (...args: any[]) => void; submit: (...args: any[]) => void; "update:modelValue": (...args: any[]) => void; pick: (...args: any[]) => void; unbind: (...args: any[]) => void; }, string, PublicProps, Readonly<Props> & Readonly<{ onClose?: ((...args: any[]) => any) | undefined; onCancel?: ((...args: any[]) => any) | undefined; onSubmit?: ((...args: any[]) => any) | undefined; "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined; onPick?: ((...args: any[]) => any) | undefined; onUnbind?: ((...args: any[]) => any) | undefined; }>, {}, {}, {}, {}, string, ComponentProvideOptions, false, { formRef: ({ $: ComponentInternalInstance; $data: {}; $props: Partial<{ footer: boolean; inline: boolean; tooltipMessage: boolean | Partial< ElTooltipProps>; model: Record<string, any>; submitText: string | null; resetText: string | null; enterSubmit: boolean; }> & Omit<{ readonly footer: boolean; readonly inline: boolean; readonly submitText: string | null; readonly resetText: string | null; readonly enterSubmit: boolean; readonly model?: Record<string, any> | undefined; readonly submitMethod?: ((model: FormModel) => Promise<any>) | undefined; readonly tooltipMessage?: boolean | Partial< ElTooltipProps> | undefined; readonly inlineColumns?: number | undefined; readonly onReset?: (() => any) | undefined | undefined; readonly onSubmit?: ((model: Record<string, any>) => any) | undefined | undefined; readonly onChange?: ((model: Record<string, any>) => any) | undefined | undefined; } & VNodeProps & AllowedComponentProps & ComponentCustomProps, "footer" | "model" | "tooltipMessage" | "inline" | "submitText" | "resetText" | "enterSubmit">; $attrs: { [x: string]: unknown; }; $refs: { [x: string]: unknown; } & { formRef: ({ $: ComponentInternalInstance; $data: {}; $props: Partial<{ readonly disabled: boolean; readonly inline: boolean; readonly labelWidth: EpPropMergeType<readonly [StringConstructor, NumberConstructor], unknown, unknown>; readonly labelPosition: EpPropMergeType<StringConstructor, "top" | "left" | "right", unknown>; readonly inlineMessage: boolean; readonly showMessage: EpPropMergeType<BooleanConstructor, unknown, unknown>; readonly requireAsteriskPosition: EpPropMergeType<StringConstructor, "left" | "right", unknown>; readonly labelSuffix: string; readonly validateOnRuleChange: EpPropMergeType<BooleanConstructor, unknown, unknown>; readonly statusIcon: boolean; readonly hideRequiredAsterisk: boolean; readonly scrollToError: boolean; }> & Omit<{ readonly disabled: boolean; readonly inline: boolean; readonly labelWidth: EpPropMergeType<readonly [StringConstructor, NumberConstructor], unknown, unknown>; readonly labelPosition: EpPropMergeType<StringConstructor, "top" | "left" | "right", unknown>; readonly inlineMessage: boolean; readonly showMessage: EpPropMergeType<BooleanConstructor, unknown, unknown>; readonly requireAsteriskPosition: EpPropMergeType<StringConstructor, "left" | "right", unknown>; readonly labelSuffix: string; readonly statusIcon: boolean; readonly validateOnRuleChange: EpPropMergeType<BooleanConstructor, unknown, unknown>; readonly hideRequiredAsterisk: boolean; readonly scrollToError: boolean; readonly size?: EpPropMergeType<StringConstructor, "" | "large" | "default" | "small", unknown> | undefined; readonly rules?: Partial<Record<string, Arrayable<FormItemRule>>> | undefined; readonly model?: Record<string, any> | undefined; readonly scrollIntoViewOptions?: EpPropMergeType<readonly [ObjectConstructor, BooleanConstructor], unknown, unknown> | undefined; onValidate?: ((prop: FormItemProp, isValid: boolean, message: string) => any) | undefined | undefined; } & VNodeProps & AllowedComponentProps & ComponentCustomProps, "disabled" | "inline" | "labelWidth" | "labelPosition" | "inlineMessage" | "showMessage" | "requireAsteriskPosition" | "labelSuffix" | "statusIcon" | "validateOnRuleChange" | "hideRequiredAsterisk" | "scrollToError">; $attrs: { [x: string]: unknown; }; $refs: { [x: string]: unknown; }; $slots: Readonly<{ [name: string]: Slot<any> | undefined; }>; $root: ComponentPublicInstance | null; $parent: ComponentPublicInstance | null; $host: Element | null; $emit: (event: "validate", prop: FormItemProp, isValid: boolean, message: string) => void; $el: any; $options: ComponentOptionsBase<Readonly< ExtractPropTypes<{ readonly model: ObjectConstructor; readonly rules: { readonly type: PropType<Partial<Record<string, Arrayable<FormItemRule>>>>; readonly required: false; readonly validator: ((val: unknown) => boolean) | undefined; __epPropKey: true; }; readonly labelPosition: EpPropFinalized<StringConstructor, "top" | "left" | "right", unknown, "right", boolean>; readonly requireAsteriskPosition: EpPropFinalized<StringConstructor, "left" | "right", unknown, "left", boolean>; readonly labelWidth: EpPropFinalized<readonly [StringConstructor, NumberConstructor], unknown, unknown, "", boolean>; readonly labelSuffix: EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>; readonly inline: BooleanConstructor; readonly inlineMessage: BooleanConstructor; readonly statusIcon: BooleanConstructor; readonly showMessage: EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>; readonly validateOnRuleChange: EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>; readonly hideRequiredAsterisk: BooleanConstructor; readonly scrollToError: BooleanConstructor; readonly scrollIntoViewOptions: { readonly type: PropType<EpPropMergeType<readonly [ObjectConstructor, BooleanConstructor], unknown, unknown>>; readonly required: false; readonly validator: ((val: unknown) => boolean) | undefined; __epPropKey: true; }; readonly size: { readonly type: PropType<EpPropMergeType<StringConstructor, "" | "small" | "default" | "large", unknown>>; readonly required: false; readonly validator: ((val: unknown) => boolean) | undefined; __epPropKey: true; }; readonly disabled: BooleanConstructor; }>> & { onValidate?: ((prop: FormItemProp, isValid: boolean, message: string) => any) | undefined; }, { validate: (callback?: FormValidateCallback) => FormValidationResult; validateField: (props?: Arrayable<FormItemProp>, callback?: FormValidateCallback) => FormValidationResult; resetFields: (props?: Arrayable<FormItemProp>) => void; clearValidate: (props?: Arrayable<FormItemProp>) => void; scrollToField: (prop: FormItemProp) => void; fields: FormItemContext[]; }, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, { validate: (prop: FormItemProp, isValid: boolean, message: string) => void; }, string, { readonly disabled: boolean; readonly inline: boolean; readonly labelWidth: EpPropMergeType<readonly [StringConstructor, NumberConstructor], unknown, unknown>; readonly labelPosition: EpPropMergeType<StringConstructor, "top" | "left" | "right", unknown>; readonly inlineMessage: boolean; readonly showMessage: EpPropMergeType<BooleanConstructor, unknown, unknown>; readonly requireAsteriskPosition: EpPropMergeType<StringConstructor, "left" | "right", unknown>; readonly labelSuffix: string; readonly validateOnRuleChange: EpPropMergeType<BooleanConstructor, unknown, unknown>; readonly statusIcon: boolean; readonly hideRequiredAsterisk: boolean; readonly scrollToError: boolean; }, {}, string, {}, GlobalComponents, GlobalDirectives, string, ComponentProvideOptions> & { beforeCreate?: (() => void) | (() => void)[]; created?: (() => void) | (() => void)[]; beforeMount?: (() => void) | (() => void)[]; mounted?: (() => void) | (() => void)[]; beforeUpdate?: (() => void) | (() => void)[]; updated?: (() => void) | (() => void)[]; activated?: (() => void) | (() => void)[]; deactivated?: (() => void) | (() => void)[]; beforeDestroy?: (() => void) | (() => void)[]; beforeUnmount?: (() => void) | (() => void)[]; destroyed?: (() => void) | (() => void)[]; unmounted?: (() => void) | (() => void)[]; renderTracked?: ((e: DebuggerEvent) => void) | ((e: DebuggerEvent) => void)[]; renderTriggered?: ((e: DebuggerEvent) => void) | ((e: DebuggerEvent) => void)[]; errorCaptured?: ((err: unknown, instance: ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: ComponentPublicInstance | null, info: string) => boolean | void)[]; }; $forceUpdate: () => void; $nextTick: nextTick; $watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, OnCleanup]) => any : (...args: [any, any, OnCleanup]) => any, options?: WatchOptions): WatchStopHandle; } & Readonly<{ readonly disabled: boolean; readonly inline: boolean; readonly labelWidth: EpPropMergeType<readonly [StringConstructor, NumberConstructor], unknown, unknown>; readonly labelPosition: EpPropMergeType<StringConstructor, "top" | "left" | "right", unknown>; readonly inlineMessage: boolean; readonly showMessage: EpPropMergeType<BooleanConstructor, unknown, unknown>; readonly requireAsteriskPosition: EpPropMergeType<StringConstructor, "left" | "right", unknown>; readonly labelSuffix: string; readonly validateOnRuleChange: EpPropMergeType<BooleanConstructor, unknown, unknown>; readonly statusIcon: boolean; readonly hideRequiredAsterisk: boolean; readonly scrollToError: boolean; }> & Omit<Readonly< ExtractPropTypes<{ readonly model: ObjectConstructor; readonly rules: { readonly type: PropType<Partial<Record<string, Arrayable<FormItemRule>>>>; readonly required: false; readonly validator: ((val: unknown) => boolean) | undefined; __epPropKey: true; }; readonly labelPosition: EpPropFinalized<StringConstructor, "top" | "left" | "right", unknown, "right", boolean>; readonly requireAsteriskPosition: EpPropFinalized<StringConstructor, "left" | "right", unknown, "left", boolean>; readonly labelWidth: EpPropFinalized<readonly [StringConstructor, NumberConstructor], unknown, unknown, "", boolean>; readonly labelSuffix: EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>; readonly inline: BooleanConstructor; readonly inlineMessage: BooleanConstructor; readonly statusIcon: BooleanConstructor; readonly showMessage: EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>; readonly validateOnRuleChange: EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>; readonly hideRequiredAsterisk: BooleanConstructor; readonly scrollToError: BooleanConstructor; readonly scrollIntoViewOptions: { readonly type: PropType<EpPropMergeType<readonly [ObjectConstructor, BooleanConstructor], unknown, unknown>>; readonly required: false; readonly validator: ((val: unknown) => boolean) | undefined; __epPropKey: true; }; readonly size: { readonly type: PropType<EpPropMergeType<StringConstructor, "" | "small" | "default" | "large", unknown>>; readonly required: false; readonly validator: ((val: unknown) => boolean) | undefined; __epPropKey: true; }; readonly disabled: BooleanConstructor; }>> & { onValidate?: ((prop: FormItemProp, isValid: boolean, message: string) => any) | undefined; }, "disabled" | "inline" | "clearValidate" | "validate" | "labelWidth" | "labelPosition" | "inlineMessage" | "showMessage" | "fields" | "requireAsteriskPosition" | "labelSuffix" | "statusIcon" | "validateOnRuleChange" | "hideRequiredAsterisk" | "scrollToError" | "validateField" | "resetFields" | "scrollToField"> & ShallowUnwrapRef<{ validate: (callback?: FormValidateCallback) => FormValidationResult; validateField: (props?: Arrayable<FormItemProp>, callback?: FormValidateCallback) => FormValidationResult; resetFields: (props?: Arrayable<FormItemProp>) => void; clearValidate: (props?: Arrayable<FormItemProp>) => void; scrollToField: (prop: FormItemProp) => void; fields: FormItemContext[]; }> & {} & ComponentCustomProperties & {} & { $slots: { default?(_: {}): any; }; }) | null; }; $slots: Readonly<{ [name: string]: Slot<any> | undefined; }>; $root: ComponentPublicInstance | null; $parent: ComponentPublicInstance | null; $host: Element | null; $emit: ((event: "reset") => void) & ((event: "submit", model: Record<string, any>) => void) & ((event: "change", model: Record<string, any>) => void); $el: any; $options: ComponentOptionsBase<Readonly< ExtractPropTypes<{ model: { type: PropType<Record<string, any>>; default(): any; }; inline: { type: BooleanConstructor; }; inlineColumns: { type: NumberConstructor; }; footer: { type: BooleanConstructor; default: boolean; }; submitText: { type: PropType<string | null>; default: string; }; resetText: { type: PropType<string | null>; default: string; }; submitMethod: { type: PropType<(model: FormModel) => Promise<any>>; }; tooltipMessage: { type: PropType<boolean | Partial< ElTooltipProps>>; default: undefined; }; enterSubmit: { type: BooleanConstructor; default: boolean; }; }>> & Readonly<{ onReset?: (() => any) | undefined; onSubmit?: ((model: Record<string, any>) => any) | undefined; onChange?: ((model: Record<string, any>) => any) | undefined; }>, { formRef: Ref<any, any>; model: FormModel; submit: () => Promise<void>; reset: (fields?: string[] | string) => void; validate: () => Promise<any>; clearValidate: () => void; }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, { reset: () => any; submit: (model: Record<string, any>) => any; change: (model: Record<string, any>) => any; }, string, { footer: boolean; inline: boolean; tooltipMessage: boolean | Partial< ElTooltipProps>; model: Record<string, any>; submitText: string | null; resetText: string | null; enterSubmit: boolean; }, {}, string, {}, GlobalComponents, GlobalDirectives, string, ComponentProvideOptions> & { beforeCreate?: (() => void) | (() => void)[]; created?: (() => void) | (() => void)[]; beforeMount?: (() => void) | (() => void)[]; mounted?: (() => void) | (() => void)[]; beforeUpdate?: (() => void) | (() => void)[]; updated?: (() => void) | (() => void)[]; activated?: (() => void) | (() => void)[]; deactivated?: (() => void) | (() => void)[]; beforeDestroy?: (() => void) | (() => void)[]; beforeUnmount?: (() => void) | (() => void)[]; destroyed?: (() => void) | (() => void)[]; unmounted?: (() => void) | (() => void)[]; renderTracked?: ((e: DebuggerEvent) => void) | ((e: DebuggerEvent) => void)[]; renderTriggered?: ((e: DebuggerEvent) => void) | ((e: DebuggerEvent) => void)[]; errorCaptured?: ((err: unknown, instance: ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: ComponentPublicInstance | null, info: string) => boolean | void)[]; }; $forceUpdate: () => void; $nextTick: nextTick; $watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, OnCleanup]) => any : (...args: [any, any, OnCleanup]) => any, options?: WatchOptions): WatchStopHandle; } & Readonly<{ footer: boolean; inline: boolean; tooltipMessage: boolean | Partial< ElTooltipProps>; model: Record<string, any>; submitText: string | null; resetText: string | null; enterSubmit: boolean; }> & Omit<Readonly< ExtractPropTypes<{ model: { type: PropType<Record<string, any>>; default(): any; }; inline: { type: BooleanConstructor; }; inlineColumns: { type: NumberConstructor; }; footer: { type: BooleanConstructor; default: boolean; }; submitText: { type: PropType<string | null>; default: string; }; resetText: { type: PropType<string | null>; default: string; }; submitMethod: { type: PropType<(model: FormModel) => Promise<any>>; }; tooltipMessage: { type: PropType<boolean | Partial< ElTooltipProps>>; default: undefined; }; enterSubmit: { type: BooleanConstructor; default: boolean; }; }>> & Readonly<{ onReset?: (() => any) | undefined; onSubmit?: ((model: Record<string, any>) => any) | undefined; onChange?: ((model: Record<string, any>) => any) | undefined; }>, "footer" | "reset" | "submit" | "model" | "formRef" | "tooltipMessage" | "inline" | "submitText" | "resetText" | "enterSubmit" | "validate" | "clearValidate"> & ShallowUnwrapRef<{ formRef: Ref<any, any>; model: FormModel; submit: () => Promise<void>; reset: (fields?: string[] | string) => void; validate: () => Promise<any>; clearValidate: () => void; }> & {} & ComponentCustomProperties & {} & { $slots: { default?(_: {}): any; footer?(_: {}): any; action?(_: {}): any; }; }) | null; }, any>; declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>; export default _default; type __VLS_WithTemplateSlots<T, S> = T & { new (): { $slots: S; }; };