This commit is contained in:
tom 2016-04-07 11:39:23 +08:00
parent 353f2cb004
commit 6614fb9746
2 changed files with 3 additions and 4 deletions

View File

@ -174,12 +174,11 @@ export default class Upload extends React.Component {
}
beforeUpload = (file) => {
console.log(this.props);
this.recentUploadStatus = this.props.beforeUpload(file);
return this.recentUploadStatus;
}
handleRemove = (file) => {
handleRemove(file) {
let fileList = this.removeFile(file);
if (fileList) {
this.onChange({

View File

@ -2,7 +2,7 @@ import React from 'react';
import Animate from 'rc-animate';
import Icon from '../icon';
const prefixCls = 'ant-upload';
import { Line } from '../progress';
import Progress from '../progress';
import classNames from 'classnames';
// https://developer.mozilla.org/en-US/docs/Web/API/FileReader/readAsDataURL
@ -81,7 +81,7 @@ export default class UploadList extends React.Component {
if (file.status === 'uploading') {
progress = (
<div className={`${prefixCls}-list-item-progress`}>
<Line {...this.props.progressAttr} percent={file.percent} />
<Progress type="line" {...this.props.progressAttr} percent={file.percent} />
</div>
);
}