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 15:06:30 +08:00
|
|
|
uploadList: 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')
|
|
|
|
);
|
|
|
|
````
|
|
|
|
|
|
|
|
<style>
|
|
|
|
#components-upload-demo-drag-simple {
|
|
|
|
width: 246px;
|
|
|
|
}
|
|
|
|
</style>
|