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.
ant-design-vue/components/upload/Dragger.tsx

23 lines
644 B

import { defineComponent } from 'vue';
import { getOptionProps, getSlot } from '../_util/props-util';
import Upload from './Upload';
import { UploadProps } from './interface';
7 years ago
export default defineComponent({
name: 'AUploadDragger',
inheritAttrs: false,
7 years ago
props: UploadProps,
render() {
const props = getOptionProps(this);
const { height, ...restProps } = props;
const { style, ...restAttrs } = this.$attrs;
7 years ago
const draggerProps = {
...restProps,
...restAttrs,
type: 'drag',
style: { ...(style as any), height },
} as any;
return <Upload {...draggerProps}>{getSlot(this)}</Upload>;
7 years ago
},
});