forked from Gitlink/forgeplus-react
附件组件-删除刚上传的文件,没有及时更新
This commit is contained in:
parent
201ece7558
commit
caf1195d05
|
@ -42,7 +42,6 @@ function NewPanel(props,ref){
|
|||
if(list && list.length>0 ){
|
||||
arr = list.filter(i=>i.id !== id);
|
||||
}
|
||||
console.log('删除后:',arr);
|
||||
setFileList(arr.map(i=>{return i.id}));
|
||||
}
|
||||
|
||||
|
@ -55,7 +54,6 @@ function NewPanel(props,ref){
|
|||
function sureFunc(){
|
||||
validateFields((error,values)=>{
|
||||
if (!error) {
|
||||
console.log('保存时:',fileList);
|
||||
createFunc(values,fileList,receivers_login,description);
|
||||
}
|
||||
})
|
||||
|
|
|
@ -59,8 +59,9 @@ class Index extends Component {
|
|||
return {
|
||||
fileList: newFileList,
|
||||
};
|
||||
});
|
||||
},()=>{
|
||||
this.fileIdList(this.state.fileList);
|
||||
});
|
||||
} else {
|
||||
this.props.showNotification(response.data.message)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue