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

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')
);