import { ComputedRef, DeepReadonly, Reactive, Ref, UnwrapNestedRefs } from 'vue'; import { Emitter } from '../../utils/mitt'; import { FormInstance } from './BaseForm.type'; import { TransitFormProps } from './TransitForm.type'; export type TransitState = { mode: TransitFormProps['gatherMode']; value: Ref; /** * 单个表单的提交 */ isSubmitting: Ref; /** * 整合表单的提交 */ isFormSubmitting: Ref; /** * 当前节点验证状态 * -1: 验证错误 * 0: 正在验证中 * 1: 验证成功 */ status: Ref>; activations: ComputedRef; currentForm: ComputedRef; formValues: Record; action: ComputedRef; processStatus: ComputedRef<-1 | 0 | 1>; finishStatus: ComputedRef; isFirst: ComputedRef; isLast: ComputedRef; /** * 下一步(当前表单项验证通才会跳转) */ next: () => void; /** * 上一步 */ previous: () => void; /** * 更新tab值 * @param value */ updateValue: (value: string) => void; /** * 或者指定表单的FormValues * @param name */ getValues: (name?: string) => any; /** * 提交表单事件,线执行难子集的 props.onSubmit , 执行父级表单上的 执行 props.onSubmit * 提交表单,根据gatherMode执行下一步或者提交表单,执行props.onSubmit */ handleFormSubmit: () => Promise | void; /** * 提交表单 * @param onSubmit */ handleSubmit: (onSubmit: TransitFormProps['onSubmit']) => void; /** * 获取form实例 * @param name */ getForm: (name: string) => FormInstance | undefined; /** * 注册TransitForm项目 * @param name * @param form */ _registerTransitForm: (name: string, form: FormInstance) => () => void; }; export type SlotTransitState = DeepReadonly>; type TransitFormType = { transitState: TransitState; eventbus: Emitter; } & TransitFormProps; export declare const TransitFormProvide: import('vue').DefineComponent; }>, import('vue').Slot | undefined, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly; }>> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>; /** * 获取Transit作用域 */ export declare function useTransitData(): TransitFormType | null; export declare const useCreateTransitState: (props: TransitFormProps) => TransitState; /** * 弹层表单作用域 */ export declare const SuperTransitStateProvide: import('vue').DefineComponent<{ data?: any; }, import('vue').Slot | undefined, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, "update:data"[], "update:data", import('vue').PublicProps, Readonly<{ data?: any; }> & Readonly<{ "onUpdate:data"?: ((...args: any[]) => any) | undefined; }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>; export declare const ussSuperTransitState: () => { transitState: Reactive>; setData: (state: Partial) => () => void; } | null; export declare const transitFormPropKeys: string[]; export declare const TransitFormItem: import('vue').DefineComponent<{ name?: any; validateOnMount?: any; validateMessages?: any; initialValues?: any; validationSchema?: any; initialErrors?: any; initialTouched?: any; keepValuesOnUnmount?: any; }, () => globalThis.VNode[] | null | undefined, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{ name?: any; validateOnMount?: any; validateMessages?: any; initialValues?: any; validationSchema?: any; initialErrors?: any; initialTouched?: any; keepValuesOnUnmount?: any; }> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>; /** * 获取Transit的自定义事件 */ export declare function useTransitEventbus(): Emitter | undefined; export {};