mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-24 19:19:57 +08:00
42708fe45d
1. Remove limit urlResolver and onRemove 2. Remove onSuccess onProgress onError 3. Add onChange 4. Add fileList and defaultFileList props
12 lines
302 B
JavaScript
12 lines
302 B
JavaScript
export default function getFileItem(file, fileList) {
|
|
let matchWay = (!file.uid) ? 'byName' : 'byUid';
|
|
let target = fileList.filter((item) => {
|
|
if (matchWay === 'byName') {
|
|
return item.name === file.name;
|
|
} else {
|
|
return item.uid === file.uid;
|
|
}
|
|
})[0];
|
|
return target;
|
|
}
|