附件删除问题

dev_hss
caicai8 6 years ago
parent e307ee9927
commit c88aafa0c5

@ -84,8 +84,10 @@ class GraduationTasksappraiseMainEditor extends Component{
componentDidMount(){
}
handleUploadChange = (info) => {
let fileList = info.fileList;
this.setState({ fileList });
if (info.file.status === 'uploading' || info.file.status === 'done' || info.file.status === 'removed') {
let fileList = info.fileList;
this.setState({ fileList });
}
}
onAttachmentRemove = (file, stateName) => {
if(!file.percent || file.percent == 100){

@ -103,7 +103,7 @@ class GraduationTasksedit extends Component{
}
// 附件相关 START
handleChange = (info) => {
if(info.file.status == "done" || info.file.status == "uploading"){
if (info.file.status === 'uploading' || info.file.status === 'done' || info.file.status === 'removed') {
let fileList = info.fileList;
// console.log(fileList)
// for(var list of fileList ){

@ -159,8 +159,10 @@ class GraduateTopicPostWorksNew extends Component{
}
// 附件相关 START
handleChange = (info) => {
let fileList = info.fileList;
this.setState({ fileList });
if (info.file.status === 'uploading' || info.file.status === 'done' || info.file.status === 'removed') {
let fileList = info.fileList;
this.setState({ fileList });
}
}
onAttachmentRemove = (file) => {
if(!file.percent || file.percent == 100){

@ -1373,14 +1373,15 @@ export default class TPMsettings extends Component {
}
handleChange = (info) => {
console.log("handleChange1");
let {fileList}=this.state;
if(fileList.length===0){
let fileLists = info.fileList;
this.setState({ fileList:fileLists,
deleteisnot:false});
if (info.file.status === 'uploading' || info.file.status === 'done' || info.file.status === 'removed') {
console.log("handleChange1");
let {fileList}=this.state;
if(fileList.length===0){
let fileLists = info.fileList;
this.setState({ fileList:fileLists,
deleteisnot:false});
}
}
}
onAttachmentRemove = (file) => {

@ -760,15 +760,17 @@ class Newshixuns extends Component {
// 附件相关 START
handleChange = (info) => {
let {fileList}=this.state;
console.log("handleChange1");
if(fileList.length===0){
if (info.file.status === 'uploading' || info.file.status === 'done' || info.file.status === 'removed') {
let {fileList}=this.state;
console.log("handleChange1");
if(fileList.length===0){
let fileLists = info.fileList;
this.setState({
// fileList:appendFileSizeToUploadFileAll(fileList),
fileList:fileLists,
deleteisnot:false});
}
}
}
}
onAttachmentRemove = (file) => {

Loading…
Cancel
Save