import {FormData, VNodeRule} from "@form-create/core"; import {Api} from "./index"; import {ComponentInternalInstance} from "@vue/runtime-core"; type ComponentSize = 'medium' | 'small' | 'mini' type ColProps = { tag?: string | 'div'; span?: number; offset?: number; move?: number; no?: number; xs?: number; sm?: number; md?: number; lg?: number; xl?: number; } type RowProps = { tag?: string | 'div'; align?: 'top' | 'middle' | 'bottom'; flex?: boolean; gutter?: number; justify?: 'start' | 'center' | 'end' | 'space-between' | 'space-around'; noSpace?: boolean; order?: 'asc' | 'des'; } interface ButtonProps { type?: 'default' | 'primary' | 'success' | 'warning' | 'danger' | 'info' | 'text'; size?: 'large' | 'medium' | 'small' | 'mini'; plain?: boolean; round?: boolean; circle?: boolean; loading?: boolean; disabled?: boolean; icon?: any; autofocus?: boolean; nativeType?: 'button' | 'submit' | 'reset'; text?: string; ghost?: boolean; [key: string]: any; } export interface OptionAttrs { col?: Boolean | Partial; row?: Boolean | Partial; info?: Boolean | Partial; wrap?: Boolean | Partial; form?: Partial<{ inline?: boolean disabled?: boolean displayOnly?: boolean labelPosition?: 'left' | 'right' | 'top' labelWidth?: string labelSuffix?: string labelAlign?: boolean showMessage?: boolean validateOnRuleChange?: boolean | 'deep' validateType?: 'tip' | 'text' size?: ComponentSize className?: any; col?: Boolean; }>; submitBtn?: Boolean | Partial; resetBtn?: Boolean | Partial; } declare const optionAttrs: Partial; }>; export interface CreatorAttrs { col(props: typeof optionAttrs.col): this; wrap(props: typeof optionAttrs.wrap): this; title(props: string | typeof optionAttrs.title): this; info(props: string | typeof optionAttrs.info): this; className(prop: string): this; } export interface RuleAttrs { col?: typeof optionAttrs.col; wrap?: typeof optionAttrs.wrap; title?: string | typeof optionAttrs.title; info?: string | typeof optionAttrs.info; className?: string; } export interface ApiAttrs { btn: { loading(loading: boolean): void; disabled(disabled: boolean): void; show(show: boolean): void; } resetBtn: { loading(loading: boolean): void; disabled(disabled: boolean): void; show(show: boolean): void; } formEl(): undefined | ComponentInternalInstance; wrapEl(id: string): undefined | ComponentInternalInstance; submit(success: (formData: FormData, $f: Api) => void, fail: ($f: Api) => void): Promise; clearValidateState(fields?: string | string[], clearSub?: Boolean): void; clearSubValidateState(fields?: string | string[]): void; validate(callback?: (state: any) => void): Promise; validateField(field: string, callback?: (state: any) => void): Promise; validateFields(fields: string | string[], callback?: (state: any) => void): Promise; submitBtnProps(props: ButtonProps): void; resetBtnProps(props: ButtonProps): void; }