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