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 {
|
2018-05-06 21:52:16 +08:00
|
|
|
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
|
|
|
};
|