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 ){
|
if(list && list.length>0 ){
|
||||||
arr = list.filter(i=>i.id !== id);
|
arr = list.filter(i=>i.id !== id);
|
||||||
}
|
}
|
||||||
console.log('删除后:',arr);
|
|
||||||
setFileList(arr.map(i=>{return i.id}));
|
setFileList(arr.map(i=>{return i.id}));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -55,7 +54,6 @@ function NewPanel(props,ref){
|
||||||
function sureFunc(){
|
function sureFunc(){
|
||||||
validateFields((error,values)=>{
|
validateFields((error,values)=>{
|
||||||
if (!error) {
|
if (!error) {
|
||||||
console.log('保存时:',fileList);
|
|
||||||
createFunc(values,fileList,receivers_login,description);
|
createFunc(values,fileList,receivers_login,description);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
|
@ -59,8 +59,9 @@ class Index extends Component {
|
||||||
return {
|
return {
|
||||||
fileList: newFileList,
|
fileList: newFileList,
|
||||||
};
|
};
|
||||||
|
},()=>{
|
||||||
|
this.fileIdList(this.state.fileList);
|
||||||
});
|
});
|
||||||
this.fileIdList(this.state.fileList);
|
|
||||||
} else {
|
} else {
|
||||||
this.props.showNotification(response.data.message)
|
this.props.showNotification(response.data.message)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue