hyb-naive
Version:
对naive-ui组件进行二次封装,主要包含Form表单组件,进行JSON化化配置处理,快速实现表单的录入和页面筛选器功能
997 lines • 58.3 kB
TypeScript
import { HFormRule } from '..';
import { ComponentInternalInstance, VNodeProps, AllowedComponentProps, ComponentCustomProps, CreateComponentPublicInstanceWithMixins, ExtractPropTypes, PropType, Ref, ComponentOptionsMixin, PublicProps, GlobalComponents, GlobalDirectives, ComponentProvideOptions, Slot, ComponentPublicInstance, ComponentOptionsBase, DebuggerEvent, nextTick, WatchOptions, WatchStopHandle, ShallowUnwrapRef, ComponentCustomProperties, DefineComponent } from 'vue';
import { LabelAlign, LabelPlacement, Size, FormValidateMessages } from 'naive-ui/es/form/src/interface';
import { FormRules, FormInst } from 'naive-ui';
import { Theme } from 'naive-ui/es/_mixins';
import { ExtractThemeOverrides } from 'naive-ui/es/_mixins/use-theme';
import { FormProps } from '../../npm-publish/form/index.vue';
import { OnCleanup } from '@vue/reactivity';
type FormDrawerProps = {
placement?: 'left' | 'right' | 'top' | 'bottom';
showFooterBtn?: boolean;
title?: string;
show: boolean;
rules: HFormRule[];
showForm?: boolean;
formCols?: number;
formType?: 'FORM' | 'FILTER';
filterInitSearch?: boolean;
formCard?: boolean;
width?: number;
confirmLoading?: boolean;
formLabelWidth?: number;
formData?: any;
resizable?: boolean;
closable?: boolean;
};
declare function __VLS_template(): {
attrs: Partial<{}>;
slots: Partial<Record<string, (_: {
formData: Record<string, any>;
setFormData: (formData: Record<string, any>) => void;
setValue: (field: string, value: any) => Promise<any>;
setValues: (values: Record<string, any>) => Promise<any>;
setRule: (field: string, rule: HFormRule) => HFormRule;
getRule: (field: string) => HFormRule | undefined;
mergeRule: (field: string, rule: HFormRule) => HFormRule;
setOptions: (field: string, options: Array<{
label?: string;
value?: any;
[key: string]: any;
}>) => Promise<any>;
validate: () => Promise<Record<string, any>>;
search: (formData?: Record<string, any>) => void;
reset: () => void;
rules: HFormRule[];
value?: any;
rule?: HFormRule;
}) => any>> & {
header?(_: {}): any;
footer?(_: {}): any;
'footer-btn-prefix'?(_: {}): any;
'footer-btn-suffix'?(_: {}): any;
default?(_: {}): any;
};
refs: {
formRef: ({
$: ComponentInternalInstance;
$data: {};
$props: {
readonly cols?: number | undefined;
readonly labelWidth?: number | undefined;
readonly labelPlacement?: "left" | "top" | undefined;
readonly size?: "small" | "medium" | "large" | undefined;
readonly labelAlign?: "left" | "right" | undefined;
readonly disabled?: boolean | undefined;
readonly title?: string | undefined;
readonly rules: HFormRule[];
readonly formData?: Record<string, any> | undefined;
readonly filterNullValue?: boolean | undefined;
readonly type?: "FORM" | "FILTER" | undefined;
readonly card?: boolean | undefined;
readonly immediateUpdate?: boolean | undefined;
readonly borderRadius?: number | undefined;
readonly searchFirstRow?: boolean | undefined;
readonly searchBtn?: {
searchSpan?: number;
search?: {
text?: string;
show?: boolean;
disabled?: boolean;
loading?: boolean;
interceptEvent?: boolean;
} | boolean;
reset?: {
text?: string;
show?: boolean;
disabled?: boolean;
loading?: boolean;
interceptEvent?: boolean;
} | boolean;
} | undefined;
readonly showFormBtn?: boolean | undefined;
readonly formBtn?: {
cancel?: {
text?: string;
show?: boolean;
disabled?: boolean;
loading?: boolean;
interceptEvent?: boolean;
};
confirm?: {
text?: string;
show?: boolean;
disabled?: boolean;
loading?: boolean;
interceptEvent?: boolean;
};
} | undefined;
readonly initSearch?: boolean | undefined;
readonly onCancel?: (() => any) | undefined | undefined;
readonly onReset?: ((formData: Record<string, any>) => any) | undefined | undefined;
readonly onDataChange?: ((formData: Record<string, any>) => any) | undefined | undefined;
readonly onSearch?: ((formData: Record<string, any>) => any) | undefined | undefined;
readonly onConfirm?: ((formData: Record<string, any>) => any) | undefined | undefined;
} & VNodeProps & AllowedComponentProps & ComponentCustomProps;
$attrs: {
[x: string]: unknown;
};
$refs: {
[x: string]: unknown;
} & {
formRef: CreateComponentPublicInstanceWithMixins<Readonly< ExtractPropTypes<{
readonly inline: BooleanConstructor;
readonly labelWidth: PropType<number | string>;
readonly labelAlign: PropType<LabelAlign>;
readonly labelPlacement: {
readonly type: PropType<LabelPlacement>;
readonly default: "top";
};
readonly model: {
readonly type: PropType<Record<string, any>>;
readonly default: () => void;
};
readonly rules: PropType<FormRules>;
readonly disabled: BooleanConstructor;
readonly size: PropType<Size>;
readonly showRequireMark: {
readonly type: PropType<boolean | undefined>;
readonly default: undefined;
};
readonly requireMarkPlacement: PropType<"left" | "right" | "right-hanging">;
readonly showFeedback: {
readonly type: BooleanConstructor;
readonly default: true;
};
readonly onSubmit: {
readonly type: PropType<(e: Event) => void>;
readonly default: (e: Event) => void;
};
readonly showLabel: {
readonly type: PropType<boolean | undefined>;
readonly default: undefined;
};
readonly validateMessages: PropType<Partial< FormValidateMessages>>;
readonly theme: PropType<Theme<"Form", {
blankHeightSmall: string;
blankHeightMedium: string;
blankHeightLarge: string;
lineHeight: string;
labelTextColor: string;
asteriskColor: string;
feedbackTextColorError: string;
feedbackTextColorWarning: string;
feedbackTextColor: string;
feedbackPadding: string;
feedbackHeightSmall: string;
feedbackHeightMedium: string;
feedbackHeightLarge: string;
feedbackFontSizeSmall: string;
feedbackFontSizeMedium: string;
feedbackFontSizeLarge: string;
labelFontSizeLeftSmall: string;
labelFontSizeLeftMedium: string;
labelFontSizeLeftLarge: string;
labelFontSizeTopSmall: string;
labelFontSizeTopMedium: string;
labelFontSizeTopLarge: string;
labelHeightSmall: string;
labelHeightMedium: string;
labelHeightLarge: string;
labelPaddingVertical: string;
labelPaddingHorizontal: string;
labelTextAlignVertical: string;
labelTextAlignHorizontal: string;
labelFontWeight: string;
}, any>>;
readonly themeOverrides: PropType<ExtractThemeOverrides<Theme<"Form", {
blankHeightSmall: string;
blankHeightMedium: string;
blankHeightLarge: string;
lineHeight: string;
labelTextColor: string;
asteriskColor: string;
feedbackTextColorError: string;
feedbackTextColorWarning: string;
feedbackTextColor: string;
feedbackPadding: string;
feedbackHeightSmall: string;
feedbackHeightMedium: string;
feedbackHeightLarge: string;
feedbackFontSizeSmall: string;
feedbackFontSizeMedium: string;
feedbackFontSizeLarge: string;
labelFontSizeLeftSmall: string;
labelFontSizeLeftMedium: string;
labelFontSizeLeftLarge: string;
labelFontSizeTopSmall: string;
labelFontSizeTopMedium: string;
labelFontSizeTopLarge: string;
labelHeightSmall: string;
labelHeightMedium: string;
labelHeightLarge: string;
labelPaddingVertical: string;
labelPaddingHorizontal: string;
labelTextAlignVertical: string;
labelTextAlignHorizontal: string;
labelFontWeight: string;
}, any>>>;
readonly builtinThemeOverrides: PropType<ExtractThemeOverrides<Theme<"Form", {
blankHeightSmall: string;
blankHeightMedium: string;
blankHeightLarge: string;
lineHeight: string;
labelTextColor: string;
asteriskColor: string;
feedbackTextColorError: string;
feedbackTextColorWarning: string;
feedbackTextColor: string;
feedbackPadding: string;
feedbackHeightSmall: string;
feedbackHeightMedium: string;
feedbackHeightLarge: string;
feedbackFontSizeSmall: string;
feedbackFontSizeMedium: string;
feedbackFontSizeLarge: string;
labelFontSizeLeftSmall: string;
labelFontSizeLeftMedium: string;
labelFontSizeLeftLarge: string;
labelFontSizeTopSmall: string;
labelFontSizeTopMedium: string;
labelFontSizeTopLarge: string;
labelHeightSmall: string;
labelHeightMedium: string;
labelHeightLarge: string;
labelPaddingVertical: string;
labelPaddingHorizontal: string;
labelTextAlignVertical: string;
labelTextAlignHorizontal: string;
labelFontWeight: string;
}, any>>>;
}>> & Readonly<{}>, FormInst & {
mergedClsPrefix: Ref<string, string>;
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, PublicProps, {
readonly inline: boolean;
readonly disabled: boolean;
readonly onSubmit: (e: Event) => void;
readonly labelPlacement: LabelPlacement;
readonly model: Record<string, any>;
readonly showRequireMark: boolean | undefined;
readonly showFeedback: boolean;
readonly showLabel: boolean | undefined;
}, true, {}, {}, GlobalComponents, GlobalDirectives, string, {}, any, ComponentProvideOptions, {
P: {};
B: {};
D: {};
C: {};
M: {};
Defaults: {};
}, Readonly< ExtractPropTypes<{
readonly inline: BooleanConstructor;
readonly labelWidth: PropType<number | string>;
readonly labelAlign: PropType<LabelAlign>;
readonly labelPlacement: {
readonly type: PropType<LabelPlacement>;
readonly default: "top";
};
readonly model: {
readonly type: PropType<Record<string, any>>;
readonly default: () => void;
};
readonly rules: PropType<FormRules>;
readonly disabled: BooleanConstructor;
readonly size: PropType<Size>;
readonly showRequireMark: {
readonly type: PropType<boolean | undefined>;
readonly default: undefined;
};
readonly requireMarkPlacement: PropType<"left" | "right" | "right-hanging">;
readonly showFeedback: {
readonly type: BooleanConstructor;
readonly default: true;
};
readonly onSubmit: {
readonly type: PropType<(e: Event) => void>;
readonly default: (e: Event) => void;
};
readonly showLabel: {
readonly type: PropType<boolean | undefined>;
readonly default: undefined;
};
readonly validateMessages: PropType<Partial< FormValidateMessages>>;
readonly theme: PropType<Theme<"Form", {
blankHeightSmall: string;
blankHeightMedium: string;
blankHeightLarge: string;
lineHeight: string;
labelTextColor: string;
asteriskColor: string;
feedbackTextColorError: string;
feedbackTextColorWarning: string;
feedbackTextColor: string;
feedbackPadding: string;
feedbackHeightSmall: string;
feedbackHeightMedium: string;
feedbackHeightLarge: string;
feedbackFontSizeSmall: string;
feedbackFontSizeMedium: string;
feedbackFontSizeLarge: string;
labelFontSizeLeftSmall: string;
labelFontSizeLeftMedium: string;
labelFontSizeLeftLarge: string;
labelFontSizeTopSmall: string;
labelFontSizeTopMedium: string;
labelFontSizeTopLarge: string;
labelHeightSmall: string;
labelHeightMedium: string;
labelHeightLarge: string;
labelPaddingVertical: string;
labelPaddingHorizontal: string;
labelTextAlignVertical: string;
labelTextAlignHorizontal: string;
labelFontWeight: string;
}, any>>;
readonly themeOverrides: PropType<ExtractThemeOverrides<Theme<"Form", {
blankHeightSmall: string;
blankHeightMedium: string;
blankHeightLarge: string;
lineHeight: string;
labelTextColor: string;
asteriskColor: string;
feedbackTextColorError: string;
feedbackTextColorWarning: string;
feedbackTextColor: string;
feedbackPadding: string;
feedbackHeightSmall: string;
feedbackHeightMedium: string;
feedbackHeightLarge: string;
feedbackFontSizeSmall: string;
feedbackFontSizeMedium: string;
feedbackFontSizeLarge: string;
labelFontSizeLeftSmall: string;
labelFontSizeLeftMedium: string;
labelFontSizeLeftLarge: string;
labelFontSizeTopSmall: string;
labelFontSizeTopMedium: string;
labelFontSizeTopLarge: string;
labelHeightSmall: string;
labelHeightMedium: string;
labelHeightLarge: string;
labelPaddingVertical: string;
labelPaddingHorizontal: string;
labelTextAlignVertical: string;
labelTextAlignHorizontal: string;
labelFontWeight: string;
}, any>>>;
readonly builtinThemeOverrides: PropType<ExtractThemeOverrides<Theme<"Form", {
blankHeightSmall: string;
blankHeightMedium: string;
blankHeightLarge: string;
lineHeight: string;
labelTextColor: string;
asteriskColor: string;
feedbackTextColorError: string;
feedbackTextColorWarning: string;
feedbackTextColor: string;
feedbackPadding: string;
feedbackHeightSmall: string;
feedbackHeightMedium: string;
feedbackHeightLarge: string;
feedbackFontSizeSmall: string;
feedbackFontSizeMedium: string;
feedbackFontSizeLarge: string;
labelFontSizeLeftSmall: string;
labelFontSizeLeftMedium: string;
labelFontSizeLeftLarge: string;
labelFontSizeTopSmall: string;
labelFontSizeTopMedium: string;
labelFontSizeTopLarge: string;
labelHeightSmall: string;
labelHeightMedium: string;
labelHeightLarge: string;
labelPaddingVertical: string;
labelPaddingHorizontal: string;
labelTextAlignVertical: string;
labelTextAlignHorizontal: string;
labelFontWeight: string;
}, any>>>;
}>> & Readonly<{}>, FormInst & {
mergedClsPrefix: Ref<string, string>;
}, {}, {}, {}, {
readonly inline: boolean;
readonly disabled: boolean;
readonly onSubmit: (e: Event) => void;
readonly labelPlacement: LabelPlacement;
readonly model: Record<string, any>;
readonly showRequireMark: boolean | undefined;
readonly showFeedback: boolean;
readonly showLabel: boolean | undefined;
}> | null;
};
$slots: Readonly<{
[name: string]: Slot<any> | undefined;
}>;
$root: ComponentPublicInstance | null;
$parent: ComponentPublicInstance | null;
$host: Element | null;
$emit: ((event: "cancel") => void) & ((event: "reset", formData: Record<string, any>) => void) & ((event: "dataChange", formData: Record<string, any>) => void) & ((event: "search", formData: Record<string, any>) => void) & ((event: "confirm", formData: Record<string, any>) => void);
$el: any;
$options: ComponentOptionsBase<Readonly< FormProps> & Readonly<{
onCancel?: (() => any) | undefined;
onReset?: ((formData: Record<string, any>) => any) | undefined;
onDataChange?: ((formData: Record<string, any>) => any) | undefined;
onSearch?: ((formData: Record<string, any>) => any) | undefined;
onConfirm?: ((formData: Record<string, any>) => any) | undefined;
}>, {
formData: Record<string, any>;
setFormData: (formData: Record<string, any>) => void;
setValue: (field: string, value: any) => Promise<any>;
setValues: (values: Record<string, any>) => Promise<any>;
setRule: (field: string, rule: HFormRule) => HFormRule;
getRule: (field: string) => HFormRule | undefined;
mergeRule: (field: string, rule: HFormRule) => HFormRule;
setOptions: (field: string, options: Array<{
label?: string;
value?: any;
[key: string]: any;
}>) => Promise<any>;
validate: () => Promise<Record<string, any>>;
search: (formData?: Record<string, any>) => void;
reset: () => void;
rules: HFormRule[];
value?: any;
rule?: HFormRule;
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
cancel: () => any;
reset: (formData: Record<string, any>) => any;
dataChange: (formData: Record<string, any>) => any;
search: (formData: Record<string, any>) => any;
confirm: (formData: Record<string, any>) => any;
}, string, {
labelWidth: number;
labelPlacement: "left" | "top";
size: "small" | "medium" | "large";
labelAlign: "left" | "right";
disabled: boolean;
filterNullValue: boolean;
type: "FORM" | "FILTER";
card: boolean;
immediateUpdate: boolean;
borderRadius: number;
searchFirstRow: boolean;
searchBtn: {
searchSpan?: number;
search?: {
text?: string;
show?: boolean;
disabled?: boolean;
loading?: boolean;
interceptEvent?: boolean;
} | boolean;
reset?: {
text?: string;
show?: boolean;
disabled?: boolean;
loading?: boolean;
interceptEvent?: boolean;
} | boolean;
};
showFormBtn: 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<{
labelWidth: number;
labelPlacement: "left" | "top";
size: "small" | "medium" | "large";
labelAlign: "left" | "right";
disabled: boolean;
filterNullValue: boolean;
type: "FORM" | "FILTER";
card: boolean;
immediateUpdate: boolean;
borderRadius: number;
searchFirstRow: boolean;
searchBtn: {
searchSpan?: number;
search?: {
text?: string;
show?: boolean;
disabled?: boolean;
loading?: boolean;
interceptEvent?: boolean;
} | boolean;
reset?: {
text?: string;
show?: boolean;
disabled?: boolean;
loading?: boolean;
interceptEvent?: boolean;
} | boolean;
};
showFormBtn: boolean;
}> & Omit<Readonly< FormProps> & Readonly<{
onCancel?: (() => any) | undefined;
onReset?: ((formData: Record<string, any>) => any) | undefined;
onDataChange?: ((formData: Record<string, any>) => any) | undefined;
onSearch?: ((formData: Record<string, any>) => any) | undefined;
onConfirm?: ((formData: Record<string, any>) => any) | undefined;
}>, "reset" | "labelWidth" | "labelPlacement" | "size" | "labelAlign" | "disabled" | "rules" | "formData" | "filterNullValue" | "type" | "card" | "immediateUpdate" | "borderRadius" | "searchFirstRow" | "searchBtn" | "showFormBtn" | "search" | "validate" | "rule" | "value" | "setFormData" | "setValue" | "setValues" | "setRule" | "getRule" | "mergeRule" | "setOptions"> & ShallowUnwrapRef<{
formData: Record<string, any>;
setFormData: (formData: Record<string, any>) => void;
setValue: (field: string, value: any) => Promise<any>;
setValues: (values: Record<string, any>) => Promise<any>;
setRule: (field: string, rule: HFormRule) => HFormRule;
getRule: (field: string) => HFormRule | undefined;
mergeRule: (field: string, rule: HFormRule) => HFormRule;
setOptions: (field: string, options: Array<{
label?: string;
value?: any;
[key: string]: any;
}>) => Promise<any>;
validate: () => Promise<Record<string, any>>;
search: (formData?: Record<string, any>) => void;
reset: () => void;
rules: HFormRule[];
value?: any;
rule?: HFormRule;
}> & {} & ComponentCustomProperties & {} & {
$slots: Partial<Record<string, (_: {
formData: Record<string, any>;
setFormData: (formData: Record<string, any>) => void;
setValue: (field: string, value: any) => Promise<any>;
setValues: (values: Record<string, any>) => Promise<any>;
setRule: (field: string, rule: HFormRule) => HFormRule;
getRule: (field: string) => HFormRule | undefined;
mergeRule: (field: string, rule: HFormRule) => HFormRule;
setOptions: (field: string, options: Array<{
label?: string;
value?: any;
[key: string]: any;
}>) => Promise<any>;
validate: () => Promise<Record<string, any>>;
search: (formData?: Record<string, any>) => void;
reset: () => void;
rules: HFormRule[];
value?: any;
rule?: HFormRule;
}) => any>> & {
search?(_: {
formData: Record<string, any>;
setFormData: (formData: Record<string, any>) => void;
setValue: (field: string, value: any) => Promise<any>;
setValues: (values: Record<string, any>) => Promise<any>;
setRule: (field: string, rule: HFormRule) => HFormRule;
getRule: (field: string) => HFormRule | undefined;
mergeRule: (field: string, rule: HFormRule) => HFormRule;
setOptions: (field: string, options: Array<{
label?: string;
value?: any;
[key: string]: any;
}>) => Promise<any>;
validate: () => Promise<Record<string, any>>;
search: (formData?: Record<string, any>) => void;
reset: () => void;
rules: HFormRule[];
value?: any;
rule?: HFormRule;
}): any;
};
}) | null;
};
rootEl: any;
};
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
declare const __VLS_component: DefineComponent<FormDrawerProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
close: () => any;
reset: (data: Record<string, any>) => any;
dataChange: (data: Record<string, any>) => any;
search: (data: Record<string, any>) => any;
confirm: (data: Record<string, any>) => any;
}, string, PublicProps, Readonly<FormDrawerProps> & Readonly<{
onClose?: (() => any) | undefined;
onReset?: ((data: Record<string, any>) => any) | undefined;
onDataChange?: ((data: Record<string, any>) => any) | undefined;
onSearch?: ((data: Record<string, any>) => any) | undefined;
onConfirm?: ((data: Record<string, any>) => any) | undefined;
}>, {
formData: any;
closable: boolean;
show: boolean;
width: number;
showForm: boolean;
formType: "FORM" | "FILTER";
confirmLoading: boolean;
showFooterBtn: boolean;
}, {}, {}, {}, string, ComponentProvideOptions, false, {
formRef: ({
$: ComponentInternalInstance;
$data: {};
$props: {
readonly cols?: number | undefined;
readonly labelWidth?: number | undefined;
readonly labelPlacement?: "left" | "top" | undefined;
readonly size?: "small" | "medium" | "large" | undefined;
readonly labelAlign?: "left" | "right" | undefined;
readonly disabled?: boolean | undefined;
readonly title?: string | undefined;
readonly rules: HFormRule[];
readonly formData?: Record<string, any> | undefined;
readonly filterNullValue?: boolean | undefined;
readonly type?: "FORM" | "FILTER" | undefined;
readonly card?: boolean | undefined;
readonly immediateUpdate?: boolean | undefined;
readonly borderRadius?: number | undefined;
readonly searchFirstRow?: boolean | undefined;
readonly searchBtn?: {
searchSpan?: number;
search?: {
text?: string;
show?: boolean;
disabled?: boolean;
loading?: boolean;
interceptEvent?: boolean;
} | boolean;
reset?: {
text?: string;
show?: boolean;
disabled?: boolean;
loading?: boolean;
interceptEvent?: boolean;
} | boolean;
} | undefined;
readonly showFormBtn?: boolean | undefined;
readonly formBtn?: {
cancel?: {
text?: string;
show?: boolean;
disabled?: boolean;
loading?: boolean;
interceptEvent?: boolean;
};
confirm?: {
text?: string;
show?: boolean;
disabled?: boolean;
loading?: boolean;
interceptEvent?: boolean;
};
} | undefined;
readonly initSearch?: boolean | undefined;
readonly onCancel?: (() => any) | undefined | undefined;
readonly onReset?: ((formData: Record<string, any>) => any) | undefined | undefined;
readonly onDataChange?: ((formData: Record<string, any>) => any) | undefined | undefined;
readonly onSearch?: ((formData: Record<string, any>) => any) | undefined | undefined;
readonly onConfirm?: ((formData: Record<string, any>) => any) | undefined | undefined;
} & VNodeProps & AllowedComponentProps & ComponentCustomProps;
$attrs: {
[x: string]: unknown;
};
$refs: {
[x: string]: unknown;
} & {
formRef: CreateComponentPublicInstanceWithMixins<Readonly< ExtractPropTypes<{
readonly inline: BooleanConstructor;
readonly labelWidth: PropType<number | string>;
readonly labelAlign: PropType<LabelAlign>;
readonly labelPlacement: {
readonly type: PropType<LabelPlacement>;
readonly default: "top";
};
readonly model: {
readonly type: PropType<Record<string, any>>;
readonly default: () => void;
};
readonly rules: PropType<FormRules>;
readonly disabled: BooleanConstructor;
readonly size: PropType<Size>;
readonly showRequireMark: {
readonly type: PropType<boolean | undefined>;
readonly default: undefined;
};
readonly requireMarkPlacement: PropType<"left" | "right" | "right-hanging">;
readonly showFeedback: {
readonly type: BooleanConstructor;
readonly default: true;
};
readonly onSubmit: {
readonly type: PropType<(e: Event) => void>;
readonly default: (e: Event) => void;
};
readonly showLabel: {
readonly type: PropType<boolean | undefined>;
readonly default: undefined;
};
readonly validateMessages: PropType<Partial< FormValidateMessages>>;
readonly theme: PropType<Theme<"Form", {
blankHeightSmall: string;
blankHeightMedium: string;
blankHeightLarge: string;
lineHeight: string;
labelTextColor: string;
asteriskColor: string;
feedbackTextColorError: string;
feedbackTextColorWarning: string;
feedbackTextColor: string;
feedbackPadding: string;
feedbackHeightSmall: string;
feedbackHeightMedium: string;
feedbackHeightLarge: string;
feedbackFontSizeSmall: string;
feedbackFontSizeMedium: string;
feedbackFontSizeLarge: string;
labelFontSizeLeftSmall: string;
labelFontSizeLeftMedium: string;
labelFontSizeLeftLarge: string;
labelFontSizeTopSmall: string;
labelFontSizeTopMedium: string;
labelFontSizeTopLarge: string;
labelHeightSmall: string;
labelHeightMedium: string;
labelHeightLarge: string;
labelPaddingVertical: string;
labelPaddingHorizontal: string;
labelTextAlignVertical: string;
labelTextAlignHorizontal: string;
labelFontWeight: string;
}, any>>;
readonly themeOverrides: PropType<ExtractThemeOverrides<Theme<"Form", {
blankHeightSmall: string;
blankHeightMedium: string;
blankHeightLarge: string;
lineHeight: string;
labelTextColor: string;
asteriskColor: string;
feedbackTextColorError: string;
feedbackTextColorWarning: string;
feedbackTextColor: string;
feedbackPadding: string;
feedbackHeightSmall: string;
feedbackHeightMedium: string;
feedbackHeightLarge: string;
feedbackFontSizeSmall: string;
feedbackFontSizeMedium: string;
feedbackFontSizeLarge: string;
labelFontSizeLeftSmall: string;
labelFontSizeLeftMedium: string;
labelFontSizeLeftLarge: string;
labelFontSizeTopSmall: string;
labelFontSizeTopMedium: string;
labelFontSizeTopLarge: string;
labelHeightSmall: string;
labelHeightMedium: string;
labelHeightLarge: string;
labelPaddingVertical: string;
labelPaddingHorizontal: string;
labelTextAlignVertical: string;
labelTextAlignHorizontal: string;
labelFontWeight: string;
}, any>>>;
readonly builtinThemeOverrides: PropType<ExtractThemeOverrides<Theme<"Form", {
blankHeightSmall: string;
blankHeightMedium: string;
blankHeightLarge: string;
lineHeight: string;
labelTextColor: string;
asteriskColor: string;
feedbackTextColorError: string;
feedbackTextColorWarning: string;
feedbackTextColor: string;
feedbackPadding: string;
feedbackHeightSmall: string;
feedbackHeightMedium: string;
feedbackHeightLarge: string;
feedbackFontSizeSmall: string;
feedbackFontSizeMedium: string;
feedbackFontSizeLarge: string;
labelFontSizeLeftSmall: string;
labelFontSizeLeftMedium: string;
labelFontSizeLeftLarge: string;
labelFontSizeTopSmall: string;
labelFontSizeTopMedium: string;
labelFontSizeTopLarge: string;
labelHeightSmall: string;
labelHeightMedium: string;
labelHeightLarge: string;
labelPaddingVertical: string;
labelPaddingHorizontal: string;
labelTextAlignVertical: string;
labelTextAlignHorizontal: string;
labelFontWeight: string;
}, any>>>;
}>> & Readonly<{}>, FormInst & {
mergedClsPrefix: Ref<string, string>;
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, PublicProps, {
readonly inline: boolean;
readonly disabled: boolean;
readonly onSubmit: (e: Event) => void;
readonly labelPlacement: LabelPlacement;
readonly model: Record<string, any>;
readonly showRequireMark: boolean | undefined;
readonly showFeedback: boolean;
readonly showLabel: boolean | undefined;
}, true, {}, {}, GlobalComponents, GlobalDirectives, string, {}, any, ComponentProvideOptions, {
P: {};
B: {};
D: {};
C: {};
M: {};
Defaults: {};
}, Readonly< ExtractPropTypes<{
readonly inline: BooleanConstructor;
readonly labelWidth: PropType<number | string>;
readonly labelAlign: PropType<LabelAlign>;
readonly labelPlacement: {
readonly type: PropType<LabelPlacement>;
readonly default: "top";
};
readonly model: {
readonly type: PropType<Record<string, any>>;
readonly default: () => void;
};
readonly rules: PropType<FormRules>;
readonly disabled: BooleanConstructor;
readonly size: PropType<Size>;
readonly showRequireMark: {
readonly type: PropType<boolean | undefined>;
readonly default: undefined;
};
readonly requireMarkPlacement: PropType<"left" | "right" | "right-hanging">;
readonly showFeedback: {
readonly type: BooleanConstructor;
readonly default: true;
};
readonly onSubmit: {
readonly type: PropType<(e: Event) => void>;
readonly default: (e: Event) => void;
};
readonly showLabel: {
readonly type: PropType<boolean | undefined>;
readonly default: undefined;
};
readonly validateMessages: PropType<Partial< FormValidateMessages>>;
readonly theme: PropType<Theme<"Form", {
blankHeightSmall: string;
blankHeightMedium: string;
blankHeightLarge: string;
lineHeight: string;
labelTextColor: string;
asteriskColor: string;
feedbackTextColorError: string;
feedbackTextColorWarning: string;
feedbackTextColor: string;
feedbackPadding: string;
feedbackHeightSmall: string;
feedbackHeightMedium: string;
feedbackHeightLarge: string;
feedbackFontSizeSmall: string;
feedbackFontSizeMedium: string;
feedbackFontSizeLarge: string;
labelFontSizeLeftSmall: string;
labelFontSizeLeftMedium: string;
labelFontSizeLeftLarge: string;
labelFontSizeTopSmall: string;
labelFontSizeTopMedium: string;
labelFontSizeTopLarge: string;
labelHeightSmall: string;
labelHeightMedium: string;
labelHeightLarge: string;
labelPaddingVertical: string;
labelPaddingHorizontal: string;
labelTextAlignVertical: string;
labelTextAlignHorizontal: string;
labelFontWeight: string;
}, any>>;
readonly themeOverrides: PropType<ExtractThemeOverrides<Theme<"Form", {
blankHeightSmall: string;
blankHeightMedium: string;
blankHeightLarge: string;
lineHeight: string;
labelTextColor: string;
asteriskColor: string;
feedbackTextColorError: string;
feedbackTextColorWarning: string;
feedbackTextColor: string;
feedbackPadding: string;
feedbackHeightSmall: string;
feedbackHeightMedium: string;
feedbackHeightLarge: string;
feedbackFontSizeSmall: string;
feedbackFontSizeMedium: string;
feedbackFontSizeLarge: string;
labelFontSizeLeftSmall: string;
labelFontSizeLeftMedium: string;
labelFontSizeLeftLarge: string;
labelFontSizeTopSmall: string;
labelFontSizeTopMedium: string;
labelFontSizeTopLarge: string;
labelHeightSmall: string;
labelHeightMedium: string;
labelHeightLarge: string;
labelPaddingVertical: string;
labelPaddingHorizontal: string;
labelTextAlignVertical: string;
labelTextAlignHorizontal: string;
labelFontWeight: string;
}, any>>>;
readonly builtinThemeOverrides: PropType<ExtractThemeOverrides<Theme<"Form", {
blankHeightSmall: string;
blankHeightMedium: string;
blankHeightLarge: string;
lineHeight: string;
labelTextColor: string;
asteriskColor: string;
feedbackTextColorError: string;
feedbackTextColorWarning: string;
feedbackTextColor: string;
feedbackPadding: string;
feedbackHeightSmall: string;
feedbackHeightMedium: string;
feedbackHeightLarge: string;
feedbackFontSizeSmall: string;
feedbackFontSizeMedium: string;
feedbackFontSizeLarge: string;
labelFontSizeLeftSmall: string;
labelFontSizeLeftMedium: string;
labelFontSizeLeftLarge: string;
labelFontSizeTopSmall: string;
labelFontSizeTopMedium: string;
labelFontSizeTopLarge: string;
labelHeightSmall: string;
labelHeightMedium: string;
labelHeightLarge: string;
labelPaddingVertical: string;
labelPaddingHorizontal: string;
labelTextAlignVertical: string;
labelTextAlignHorizontal: string;
labelFontWeight: string;
}, any>>>;
}>> & Readonly<{}>, FormInst & {
mergedClsPrefix: Ref<string, string>;
}, {}, {}, {}, {
readonly inline: boolean;
readonly disabled: boolean;
readonly onSubmit: (e: Event) => void;
readonly labelPlacement: LabelPlacement;
readonly model: Record<string, any>;
readonly showRequireMark: boolean | undefined;
readonly showFeedback: boolean;
readonly showLabel: boolean | undefined;
}> | null;
};
$slots: Readonly<{
[name: string]: Slot<any> | undefined;
}>;
$root: ComponentPublicInstance | null;
$parent: ComponentPublicInstance | null;
$host: Element | null;
$emit: ((event: "cancel") => void) & ((event: "reset", formData: Record<string, any>) => void) & ((event: "dataChange", formData: Record<string, any>) => void) & ((event: "search", formData: Record<string, any>) => void) & ((event: "confirm", formData: Record<string, any>) => void);
$el: any;
$options: ComponentOptionsBase<Readonly< FormProps> & Readonly<{
onCancel?: (() => any) | undefined;
onReset?: ((formData: Record<string, any>) => any) | undefined;
onDataChange?: ((formData: Record<string, any>) => any) | undefined;
onSearch?: ((formData: Record<string, any>) => any) | undefined;
onConfirm?: ((formData: Record<string, any>) => any) | undefined;
}>, {
formData: Record<string, any>;
setFormData: (formData: Record<string, any>) => void;
setValue: (field: string, value: any) => Promise<any>;
setValues: (values: Recor