mirror of
https://gitee.com/ant-design-vue/ant-design-vue.git
synced 2024-12-02 20:18:22 +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.
25 lines
647 B
Vue
25 lines
647 B
Vue
import { defineComponent } from 'vue';
|
|
import Transition, { getTransitionProps } from '../_util/transition';
|
|
|
|
export default defineComponent({
|
|
compatConfig: { MODE: 3 },
|
|
name: 'Mask',
|
|
props: {
|
|
prefixCls: String,
|
|
visible: Boolean,
|
|
motionName: String,
|
|
maskProps: Object,
|
|
},
|
|
setup(props, {}) {
|
|
return () => {
|
|
const { prefixCls, visible, maskProps, motionName } = props;
|
|
const transitionProps = getTransitionProps(motionName);
|
|
return (
|
|
<Transition {...transitionProps}>
|
|
<div v-show={visible} class={`${prefixCls}-mask`} {...maskProps} />
|
|
</Transition>
|
|
);
|
|
};
|
|
},
|
|
});
|