Commit 20ee22f3 authored by XieZhiXiong's avatar XieZhiXiong

fix: 修复新值没有覆盖旧值的问题

parent d11b74b0
...@@ -67,11 +67,11 @@ const ActionModal: React.FC<IProps> = (props) => { ...@@ -67,11 +67,11 @@ const ActionModal: React.FC<IProps> = (props) => {
const formRef = useRef<ReasonFormRefHandle | EditFormRefHandle | null>(null); const formRef = useRef<ReasonFormRefHandle | EditFormRefHandle | null>(null);
const handleReasonSubmit = (values: ReasonValueType) => { const handleReasonSubmit = (values: ReasonValueType) => {
onConfirm({ reason: values.reason, ...value }, modalName); onConfirm({ ...value, reason: values.reason }, modalName);
}; };
const handleEditSubmit = (values: EditSubmitValueType) => { const handleEditSubmit = (values: EditSubmitValueType) => {
onConfirm({ ...values, ...value }, modalName); onConfirm({ ...value, ...values, }, modalName);
}; };
const handleConfirm = () => { const handleConfirm = () => {
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: XieZhiXiong * @Author: XieZhiXiong
* @Date: 2021-07-02 17:53:01 * @Date: 2021-07-02 17:53:01
* @LastEditors: XieZhiXiong * @LastEditors: XieZhiXiong
* @LastEditTime: 2021-07-02 18:07:39 * @LastEditTime: 2021-11-26 18:08:51
* @Description: 修改的表单 * @Description: 修改的表单
*/ */
import React, { useImperativeHandle } from 'react'; import React, { useImperativeHandle } from 'react';
...@@ -51,7 +51,7 @@ export interface EditFormRefHandle { ...@@ -51,7 +51,7 @@ export interface EditFormRefHandle {
} }
const EditForm: React.ForwardRefRenderFunction<EditFormRefHandle, IProps> = ((props, ref) => { const EditForm: React.ForwardRefRenderFunction<EditFormRefHandle, IProps> = ((props, ref) => {
const { onSubmit } = props; const { onSubmit, value } = props;
useImperativeHandle(ref, () => ({ useImperativeHandle(ref, () => ({
submit: () => formActions.submit(), submit: () => formActions.submit(),
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: XieZhiXiong * @Author: XieZhiXiong
* @Date: 2021-06-22 09:49:42 * @Date: 2021-06-22 09:49:42
* @LastEditors: XieZhiXiong * @LastEditors: XieZhiXiong
* @LastEditTime: 2021-09-30 17:07:20 * @LastEditTime: 2021-11-26 18:12:40
* @Description: 商家优惠劵查询 * @Description: 商家优惠劵查询
*/ */
import React, { useRef, useState } from 'react'; import React, { useRef, useState } from 'react';
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment