mirror of
https://github.com/ant-design/ant-design.git
synced 2024-12-12 23:35:38 +08:00
31 lines
418 B
Markdown
31 lines
418 B
Markdown
# 拖拽上传
|
|
|
|
- order: 4
|
|
|
|
样式简单一些。
|
|
|
|
---
|
|
|
|
````jsx
|
|
import { Upload, Icon } from 'antd';
|
|
const Dragger = Upload.Dragger;
|
|
|
|
const props = {
|
|
name: 'file',
|
|
action: '/upload.do'
|
|
};
|
|
|
|
ReactDOM.render(
|
|
<Dragger {...props}>
|
|
<Icon type="plus" />
|
|
</Dragger>,
|
|
document.getElementById('components-upload-demo-drag-simple')
|
|
);
|
|
````
|
|
|
|
<style>
|
|
#components-upload-demo-drag-simple {
|
|
width: 246px;
|
|
}
|
|
</style>
|