import { ValidateRules } from '../../../components/Form/FormItem'; export declare const SET_FORM_ITEM = "SET_FORM_ITEM"; export declare const DELETE_FORM_ITEM = "DELETE_FORM_ITEM"; export declare const SET_FORM_ITEMS = "SET_FORM_ITEMS"; export declare const FORM_SUBMIT = "FORM_SUBMIT"; export declare const INIT_FORM = "INIT_FORM"; export declare const SET_FORM = "SET_FORM"; export declare const DELETE_FORM = "DELETE_FORM"; export declare type SET_FORM_ITEM_PAYLOAD = { /** * 表单Name */ formName: string; /** * 表单元素Name */ formItemName: string; /** * 表单是否合格 */ status?: 'success' | 'warning' | 'error' | 'validating' | undefined; /** * 表单是否合法 */ valid?: boolean; /** * 是否必须 */ required?: boolean; /** * 各种类型的错误 */ errorMsg?: string; /** * 验证规则 */ rules?: ValidateRules[]; /** * 强制触发表单元素进行验证 */ $validate?: boolean; }; export declare type DELETE_FORM_ITEM_PAYLOAD = { /** * 表单的Key */ formName: string; /** * 表单元素的Key */ formItemName: string; }; export declare type FORM_SUBMIT_PAYLOAD = { name: string; }; export declare type INIT_FORM_PAYLOAD = { name: string; data: Object; }; export declare type SET_FORM_PAYLOAD = { name: string; key: string; value: any; }; export declare type DELETE_FORM_PAYLOAD = { name: string; }; export declare type IActions = { INIT_FORM: { type: typeof INIT_FORM; payload: INIT_FORM_PAYLOAD; }; SET_FORM: { type: typeof SET_FORM; payload: SET_FORM_PAYLOAD; }; SET_FORM_ITEM: { type: typeof SET_FORM_ITEM; payload: SET_FORM_ITEM_PAYLOAD; }; DELETE_FORM_ITEM: { type: typeof DELETE_FORM_ITEM; payload: DELETE_FORM_ITEM_PAYLOAD; }; DELETE_FORM: { type: typeof DELETE_FORM; payload: DELETE_FORM_PAYLOAD; }; SET_FORM_ITEMS: { type: typeof SET_FORM_ITEMS; payload: SET_FORM_ITEM_PAYLOAD[]; }; FORM_SUBMIT: { type: typeof FORM_SUBMIT; payload: FORM_SUBMIT_PAYLOAD; }; }; export declare type IFormActions = IActions[keyof IActions]; export declare const actionCreators: { setFormItem: (payload: SET_FORM_ITEM_PAYLOAD) => { type: "SET_FORM_ITEM"; payload: SET_FORM_ITEM_PAYLOAD; }; deleteFormItem: (payload: DELETE_FORM_ITEM_PAYLOAD) => { type: "DELETE_FORM_ITEM"; payload: DELETE_FORM_ITEM_PAYLOAD; }; setFormItems: (payload: SET_FORM_ITEM_PAYLOAD[]) => { type: "SET_FORM_ITEMS"; payload: SET_FORM_ITEM_PAYLOAD[]; }; formSubmit: (payload: FORM_SUBMIT_PAYLOAD) => { type: "FORM_SUBMIT"; payload: FORM_SUBMIT_PAYLOAD; }; initForm: (payload: INIT_FORM_PAYLOAD) => { type: "INIT_FORM"; payload: INIT_FORM_PAYLOAD; }; setForm: (payload: SET_FORM_PAYLOAD) => { type: "SET_FORM"; payload: SET_FORM_PAYLOAD; }; deleteForm: (payload: DELETE_FORM_PAYLOAD) => { type: "DELETE_FORM"; payload: DELETE_FORM_PAYLOAD; }; };