ant-design-vue/components/upload/Dragger.jsx

21 lines
487 B
Vue
Raw Normal View History

2019-01-12 11:33:27 +08:00
import { getOptionProps } from '../_util/props-util';
import Upload from './Upload';
import { UploadProps } from './interface';
2018-04-13 16:19:50 +08:00
export default {
name: 'AUploadDragger',
2018-04-13 16:19:50 +08:00
props: UploadProps,
2019-01-12 11:33:27 +08:00
render() {
const props = getOptionProps(this);
2018-04-13 16:19:50 +08:00
const draggerProps = {
props: {
...props,
type: 'drag',
},
on: this.$listeners,
style: { height: this.height },
2019-01-12 11:33:27 +08:00
};
return <Upload {...draggerProps}>{this.$slots.default}</Upload>;
2018-04-13 16:19:50 +08:00
},
2019-01-12 11:33:27 +08:00
};