ant-design-vue/components/vc-dialog/Mask.tsx
tangjinzhou 98755f332c
refactor: modal (#5129), close #5096
* fix: can not scroll when close dialog #5096

* refactor: modal
2022-01-06 16:08:53 +08:00

24 lines
618 B
Vue

import { defineComponent } from 'vue';
import Transition, { getTransitionProps } from '../_util/transition';
export default defineComponent({
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>
);
};
},
});