Mask.js 1.2 KB

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