You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
644 B
23 lines
644 B
4 years ago
|
import { defineComponent } from 'vue';
|
||
5 years ago
|
import { getOptionProps, getSlot } from '../_util/props-util';
|
||
6 years ago
|
import Upload from './Upload';
|
||
|
import { UploadProps } from './interface';
|
||
7 years ago
|
|
||
4 years ago
|
export default defineComponent({
|
||
7 years ago
|
name: 'AUploadDragger',
|
||
5 years ago
|
inheritAttrs: false,
|
||
7 years ago
|
props: UploadProps,
|
||
6 years ago
|
render() {
|
||
|
const props = getOptionProps(this);
|
||
5 years ago
|
const { height, ...restProps } = props;
|
||
|
const { style, ...restAttrs } = this.$attrs;
|
||
7 years ago
|
const draggerProps = {
|
||
5 years ago
|
...restProps,
|
||
|
...restAttrs,
|
||
|
type: 'drag',
|
||
4 years ago
|
style: { ...(style as any), height },
|
||
|
} as any;
|
||
5 years ago
|
return <Upload {...draggerProps}>{getSlot(this)}</Upload>;
|
||
7 years ago
|
},
|
||
4 years ago
|
});
|