Browse Source

Merge pull request #1350 from caolvchong/develop-1.0.0

upload的一些问题
pull/1379/head
afc163 9 years ago
parent
commit
be378d4d70
  1. 2
      components/upload/index.jsx
  2. 4
      components/upload/uploadList.jsx

2
components/upload/index.jsx

@ -173,7 +173,7 @@ export default class Upload extends React.Component {
this.handleRemove(targetItem); this.handleRemove(targetItem);
} }
beforeUpload(file) { beforeUpload = (file) => {
this.recentUploadStatus = this.props.beforeUpload(file); this.recentUploadStatus = this.props.beforeUpload(file);
return this.recentUploadStatus; return this.recentUploadStatus;
} }

4
components/upload/uploadList.jsx

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

Loading…
Cancel
Save