ant-design/components/upload/demo/basic.md
afc163 b68ec83e36 优化 upload 实现
1. 使用 Upload.dragger 代替 type
2. 将拖拽上传的内容区域交给用户自己实现
3. 改进 uploadList 的实现方式, 尽量避免使用 Dom 操作
4. 优化样式展现
2015-08-09 18:00:20 +08:00

31 lines
502 B
Markdown

# 点击上传
- order: 1
经典款式,用户点击按钮弹出文件选择框。
---
````jsx
var Upload = antd.Upload;
var props = {
description: '支持扩展名为: .rar .zip ...',
action: '/upload.do',
data: {},
accept: '',
uploadTip: '',
start: function(file){
console.log(file.name)
},
error: function() {},
success: function() {},
progress: function() {}
};
React.render(
<Upload {...props} />,
document.getElementById('components-upload-demo-basic')
);
````