2015-08-09 18:00:20 +08:00
|
|
|
# 拖拽上传
|
|
|
|
|
2015-09-01 00:52:34 +08:00
|
|
|
- order: 4
|
2015-08-09 18:00:20 +08:00
|
|
|
|
|
|
|
样式简单一些。
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
````jsx
|
2015-10-28 20:55:49 +08:00
|
|
|
import { Upload, Icon } from 'antd';
|
|
|
|
const Dragger = Upload.Dragger;
|
2015-08-09 18:00:20 +08:00
|
|
|
|
2015-10-28 20:55:49 +08:00
|
|
|
const props = {
|
2015-08-09 18:00:20 +08:00
|
|
|
name: 'file',
|
2015-11-03 16:58:41 +08:00
|
|
|
showUploadList: false,
|
2015-08-31 21:26:34 +08:00
|
|
|
action: '/upload.do'
|
2015-08-09 18:00:20 +08:00
|
|
|
};
|
|
|
|
|
2015-10-20 16:47:55 +08:00
|
|
|
ReactDOM.render(
|
2015-08-09 18:00:20 +08:00
|
|
|
<Dragger {...props}>
|
2015-10-02 16:52:34 +08:00
|
|
|
<Icon type="plus" />
|
2015-08-09 18:00:20 +08:00
|
|
|
</Dragger>,
|
|
|
|
document.getElementById('components-upload-demo-drag-simple')
|
|
|
|
);
|
|
|
|
````
|
|
|
|
|
2015-11-04 12:00:49 +08:00
|
|
|
````css
|
2015-08-09 18:00:20 +08:00
|
|
|
#components-upload-demo-drag-simple {
|
|
|
|
width: 246px;
|
|
|
|
}
|
2015-11-04 12:00:49 +08:00
|
|
|
````
|