export declare const SET_FORM_ITEM = "RCRE_SET_FORM_ITEM"; export declare const DELETE_FORM_ITEM = "RCRE_DELETE_FORM_ITEM"; export declare const SET_FORM_ITEMS = "RCRE_SET_FORM_ITEMS"; export declare const FORM_SUBMIT = "RCRE_FORM_SUBMIT"; export declare const INIT_FORM = "RCRE_INIT_FORM"; export declare const SET_FORM = "RCRE_SET_FORM"; export declare const DELETE_FORM = "RCRE_DELETE_FORM"; export declare const RESET_FORM = "RCRE_RESET_FORM"; export declare type SET_FORM_ITEM_PAYLOAD = { /** * 表单Name */ formName: string; /** * 表单元素Name */ formItemName: string; /** * 表单是否合格 */ status?: string; /** * 表单是否合法 */ valid?: boolean; /** * 是否必须 */ required?: boolean; /** * 各种类型的错误 */ errorMsg?: string; /** * 验证规则 */ rules?: any[]; /** * 强制触发表单元素进行验证 */ $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; }; RESET_FORM: { type: typeof RESET_FORM; }; }; export declare type IFormActions = IActions[keyof IActions]; export declare const formActions: { setFormItem: (payload: SET_FORM_ITEM_PAYLOAD) => { type: "RCRE_SET_FORM_ITEM"; payload: SET_FORM_ITEM_PAYLOAD; }; deleteFormItem: (payload: DELETE_FORM_ITEM_PAYLOAD) => { type: "RCRE_DELETE_FORM_ITEM"; payload: DELETE_FORM_ITEM_PAYLOAD; }; setFormItems: (payload: SET_FORM_ITEM_PAYLOAD[]) => { type: "RCRE_SET_FORM_ITEMS"; payload: SET_FORM_ITEM_PAYLOAD[]; }; formSubmit: (payload: FORM_SUBMIT_PAYLOAD) => { type: "RCRE_FORM_SUBMIT"; payload: FORM_SUBMIT_PAYLOAD; }; initForm: (payload: INIT_FORM_PAYLOAD) => { type: "RCRE_INIT_FORM"; payload: INIT_FORM_PAYLOAD; }; setForm: (payload: SET_FORM_PAYLOAD) => { type: "RCRE_SET_FORM"; payload: SET_FORM_PAYLOAD; }; deleteForm: (payload: DELETE_FORM_PAYLOAD) => { type: "RCRE_DELETE_FORM"; payload: DELETE_FORM_PAYLOAD; }; resetForm: () => { type: "RCRE_RESET_FORM"; }; };