Commit 85238650 authored by baiyaaaaa's avatar baiyaaaaa Committed by 杨奕

fix file not remote when before-upload reject

parent a50fcfd9
...@@ -160,7 +160,10 @@ export default { ...@@ -160,7 +160,10 @@ export default {
this.onError(err, file, this.uploadFiles); this.onError(err, file, this.uploadFiles);
this.onChange(file, this.uploadFiles); this.onChange(file, this.uploadFiles);
}, },
handleRemove(file) { handleRemove(file, raw) {
if (raw) {
file = this.getFile(raw);
}
var fileList = this.uploadFiles; var fileList = this.uploadFiles;
fileList.splice(fileList.indexOf(file), 1); fileList.splice(fileList.indexOf(file), 1);
this.onRemove(file, fileList); this.onRemove(file, fileList);
...@@ -181,7 +184,7 @@ export default { ...@@ -181,7 +184,7 @@ export default {
this.uploadFiles this.uploadFiles
.filter(file => file.status === 'ready') .filter(file => file.status === 'ready')
.forEach(file => { .forEach(file => {
this.$refs['upload-inner'].upload(file.raw, file); this.$refs['upload-inner'].upload(file.raw);
}); });
}, },
getMigratingConfig() { getMigratingConfig() {
......
...@@ -85,12 +85,12 @@ export default { ...@@ -85,12 +85,12 @@ export default {
this.post(rawFile); this.post(rawFile);
} }
}, () => { }, () => {
if (file) this.onRemove(file); this.onRemove(rawFile, true);
}); });
} else if (before !== false) { } else if (before !== false) {
this.post(rawFile); this.post(rawFile);
} else { } else {
if (file) this.onRemove(file); this.onRemove(rawFile, true);
} }
}, },
post(rawFile) { post(rawFile) {
......
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