Mask.js 955 B

123456789101112131415161718192021222324252627282930313233
  1. import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
  2. import { withDirectives as _withDirectives, createVNode as _createVNode, vShow as _vShow } from "vue";
  3. import { defineComponent } from 'vue';
  4. import Transition, { getTransitionProps } from '../_util/transition';
  5. export default defineComponent({
  6. compatConfig: {
  7. MODE: 3
  8. },
  9. name: 'DialogMask',
  10. props: {
  11. prefixCls: String,
  12. visible: Boolean,
  13. motionName: String,
  14. maskProps: Object
  15. },
  16. setup(props, _ref) {
  17. let {} = _ref;
  18. return () => {
  19. const {
  20. prefixCls,
  21. visible,
  22. maskProps,
  23. motionName
  24. } = props;
  25. const transitionProps = getTransitionProps(motionName);
  26. return _createVNode(Transition, transitionProps, {
  27. default: () => [_withDirectives(_createVNode("div", _objectSpread({
  28. "class": `${prefixCls}-mask`
  29. }, maskProps), null), [[_vShow, visible]])]
  30. });
  31. };
  32. }
  33. });