vuecssuiant-designantdreactantantd-vueenterprisefrontendui-designvue-antdvue-antd-uivue3vuecomponent
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.
23 lines
618 B
23 lines
618 B
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> |
|
); |
|
}; |
|
}, |
|
});
|
|
|