mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-24 19:19:57 +08:00
Merge branch '1.x-stable'
This commit is contained in:
commit
4954f5d733
@ -355,7 +355,6 @@
|
||||
.@{select-prefix-cls}-selection__rendered {
|
||||
padding: 0;
|
||||
height: 100%;
|
||||
overflow: visible;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -140,8 +140,10 @@ export default class Upload extends React.Component {
|
||||
} catch (e) { /* do nothing */ }
|
||||
let fileList = this.state.fileList;
|
||||
let targetItem = getFileItem(file, fileList);
|
||||
// 之前已经删除
|
||||
if (targetItem) {
|
||||
// removed
|
||||
if (!targetItem) {
|
||||
return;
|
||||
}
|
||||
targetItem.status = 'done';
|
||||
targetItem.response = response;
|
||||
this.onChange({
|
||||
@ -149,12 +151,14 @@ export default class Upload extends React.Component {
|
||||
fileList,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
onProgress = (e, file) => {
|
||||
let fileList = this.state.fileList;
|
||||
let targetItem = getFileItem(file, fileList);
|
||||
if (!targetItem) return;
|
||||
// removed
|
||||
if (!targetItem) {
|
||||
return;
|
||||
}
|
||||
targetItem.percent = e.percent;
|
||||
this.onChange({
|
||||
event: e,
|
||||
@ -167,6 +171,10 @@ export default class Upload extends React.Component {
|
||||
this.clearProgressTimer();
|
||||
let fileList = this.state.fileList;
|
||||
let targetItem = getFileItem(file, fileList);
|
||||
// removed
|
||||
if (!targetItem) {
|
||||
return;
|
||||
}
|
||||
targetItem.error = error;
|
||||
targetItem.response = response;
|
||||
targetItem.status = 'error';
|
||||
|
Loading…
Reference in New Issue
Block a user