From 9a2277d39b55461967a7fc67201e524b89daa03e Mon Sep 17 00:00:00 2001 From: dminyi <1301963064@qq.com> Date: Tue, 03 Sep 2024 09:59:47 +0800 Subject: [PATCH] Merge branch 'master' of http://120.79.193.119:9090/r/gzzfw/frontEnd/gzDyh into master --- gz-customerSystem/src/components/ArcoUpload/index.jsx | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/gz-customerSystem/src/components/ArcoUpload/index.jsx b/gz-customerSystem/src/components/ArcoUpload/index.jsx index 592096c..61f5fd4 100644 --- a/gz-customerSystem/src/components/ArcoUpload/index.jsx +++ b/gz-customerSystem/src/components/ArcoUpload/index.jsx @@ -14,12 +14,13 @@ * handleChangeFile, // 文件上传成功之后的回调 * label *, // form的label名 * editData *, // 编辑回显数据 + * handleDelFile *,//删除文件接口 */ export default function ArcoUpload(props) { const [myFileList, setMyFileList] = useState([]) useEffect(() => { - if(props.editData) { + if (props.editData) { console.log(props.editData[props.field]); setMyFileList(props.editData[props.field]) } @@ -43,7 +44,6 @@ }} headers={{ Authorization: $$.getSessionStorage('customerSystemToken') }} onChange={(fileList, file) => { - console.log(fileList, myFileList, file); const { status, response } = file //因为字节upLoad组件有bug,不能区分添加文件还是删除文件,所以用这种办法来判断是不是删除 const isDel = myFileList && myFileList.length > fileList.length @@ -62,8 +62,8 @@ } } //删除文件 - if (isDel) { - + if (isDel && props.handleDelFile) { + props.handleDelFile(response.data[0].id) } setMyFileList(fileList) }} -- Gitblit v1.8.0