customize upload button children by user

This commit is contained in:
afc163 2015-08-18 15:33:48 +08:00
parent 3cdaea4452
commit f9b7482b91
2 changed files with 4 additions and 2 deletions

View File

@ -24,7 +24,9 @@ var props = {
}; };
React.render( React.render(
<Upload {...props} />, <Upload {...props}>
<i className="anticon anticon-upload"></i> 点击上传
</Upload>,
document.getElementById('components-upload-demo-basic') document.getElementById('components-upload-demo-basic')
); );
```` ````

View File

@ -97,7 +97,7 @@ let AntUpload = React.createClass({
<div className={prefixCls + ' ' + prefixCls + '-select'}> <div className={prefixCls + ' ' + prefixCls + '-select'}>
<Upload {...props}> <Upload {...props}>
<button className='ant-btn ant-btn-ghost'> <button className='ant-btn ant-btn-ghost'>
<i className='anticon anticon-upload'></i> 点击上传 {this.props.children}
</button> </button>
</Upload> </Upload>
<UploadList items={this.state.downloadList} /> <UploadList items={this.state.downloadList} />