mirror of
https://gitee.com/ant-design/ant-design.git
synced 2024-12-04 21:18:01 +08:00
b68ec83e36
1. 使用 Upload.dragger 代替 type 2. 将拖拽上传的内容区域交给用户自己实现 3. 改进 uploadList 的实现方式, 尽量避免使用 Dom 操作 4. 优化样式展现
560 B
560 B
拖拽上传
- order: 2
样式简单一些。
var Dragger = antd.Upload.Dragger;
var props = {
name: 'file',
action: '/upload.do',
data: {},
accept: '',
uploadTip: '',
error: function() {},
success: function() {},
progress: function() {},
start: function() {}
};
React.render(
<Dragger {...props}>
<i className="anticon anticon-plus"></i>
</Dragger>,
document.getElementById('components-upload-demo-drag-simple')
);