mirror of
https://gitee.com/ant-design-vue/ant-design-vue.git
synced 2024-11-29 18:48:32 +08:00
a2f7d6d062
closes vueComponent/ant-design-vue#5765 Add `compatConfig: { MODE: 3 }` to all component definitions to signal to `@vue/compat` not to use any Vue 2 compatibility features.
24 lines
686 B
Vue
24 lines
686 B
Vue
import { defineComponent } from 'vue';
|
|
import Upload from './Upload';
|
|
import { uploadProps } from './interface';
|
|
|
|
export default defineComponent({
|
|
compatConfig: { MODE: 3 },
|
|
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>;
|
|
};
|
|
},
|
|
});
|