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
657 B

import { defineComponent } from 'vue';
import Upload from './Upload';
import { uploadProps } from './interface';
7 years ago
export default defineComponent({
name: 'AUploadDragger',
inheritAttrs: false,
props: uploadProps(),
setup(props, { slots, attrs }) {
return () => {
const { height, ...restProps } = props;
const { style, ...restAttrs } = attrs;
const draggerProps = {
...restProps,
...restAttrs,
type: 'drag',
style: { ...(style as any), height: typeof height === 'number' ? `${height}px` : height },
} as any;
return <Upload {...draggerProps} v-slots={slots}></Upload>;
};
7 years ago
},
});