feat: update modal
parent
e2a7165508
commit
75e1661c16
|
@ -24,6 +24,7 @@ export default {
|
||||||
visible: PropTypes.bool,
|
visible: PropTypes.bool,
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
|
this._component = null;
|
||||||
const { visible } = this.$props;
|
const { visible } = this.$props;
|
||||||
openCount = visible ? openCount + 1 : openCount;
|
openCount = visible ? openCount + 1 : openCount;
|
||||||
return {};
|
return {};
|
||||||
|
|
|
@ -3,10 +3,7 @@ import Dialog from './Modal';
|
||||||
import ActionButton from './ActionButton';
|
import ActionButton from './ActionButton';
|
||||||
import { getConfirmLocale } from './locale';
|
import { getConfirmLocale } from './locale';
|
||||||
|
|
||||||
export default {
|
const ConfirmDialog = (_, { attrs }) => {
|
||||||
functional: true,
|
|
||||||
render(h, context) {
|
|
||||||
const { props } = context;
|
|
||||||
const {
|
const {
|
||||||
icon,
|
icon,
|
||||||
onCancel,
|
onCancel,
|
||||||
|
@ -22,29 +19,29 @@ export default {
|
||||||
okButtonProps,
|
okButtonProps,
|
||||||
cancelButtonProps,
|
cancelButtonProps,
|
||||||
closable = false,
|
closable = false,
|
||||||
} = props;
|
} = attrs;
|
||||||
const okType = props.okType || 'primary';
|
const okType = attrs.okType || 'primary';
|
||||||
const prefixCls = props.prefixCls || 'ant-modal';
|
const prefixCls = attrs.prefixCls || 'ant-modal';
|
||||||
const contentPrefixCls = `${prefixCls}-confirm`;
|
const contentPrefixCls = `${prefixCls}-confirm`;
|
||||||
// 默认为 true,保持向下兼容
|
// 默认为 true,保持向下兼容
|
||||||
const okCancel = 'okCancel' in props ? props.okCancel : true;
|
const okCancel = 'okCancel' in attrs ? attrs.okCancel : true;
|
||||||
const width = props.width || 416;
|
const width = attrs.width || 416;
|
||||||
const style = props.style || {};
|
const style = attrs.style || {};
|
||||||
const mask = props.mask === undefined ? true : props.mask;
|
const mask = attrs.mask === undefined ? true : attrs.mask;
|
||||||
// 默认为 false,保持旧版默认行为
|
// 默认为 false,保持旧版默认行为
|
||||||
const maskClosable = props.maskClosable === undefined ? false : props.maskClosable;
|
const maskClosable = attrs.maskClosable === undefined ? false : attrs.maskClosable;
|
||||||
const runtimeLocale = getConfirmLocale();
|
const runtimeLocale = getConfirmLocale();
|
||||||
const okText = props.okText || (okCancel ? runtimeLocale.okText : runtimeLocale.justOkText);
|
const okText = attrs.okText || (okCancel ? runtimeLocale.okText : runtimeLocale.justOkText);
|
||||||
const cancelText = props.cancelText || runtimeLocale.cancelText;
|
const cancelText = attrs.cancelText || runtimeLocale.cancelText;
|
||||||
const autoFocusButton = props.autoFocusButton === null ? false : props.autoFocusButton || 'ok';
|
const autoFocusButton = attrs.autoFocusButton === null ? false : attrs.autoFocusButton || 'ok';
|
||||||
const transitionName = props.transitionName || 'zoom';
|
const transitionName = attrs.transitionName || 'zoom';
|
||||||
const maskTransitionName = props.maskTransitionName || 'fade';
|
const maskTransitionName = attrs.maskTransitionName || 'fade';
|
||||||
|
|
||||||
const classString = classNames(
|
const classString = classNames(
|
||||||
contentPrefixCls,
|
contentPrefixCls,
|
||||||
`${contentPrefixCls}-${props.type}`,
|
`${contentPrefixCls}-${attrs.type}`,
|
||||||
`${prefixCls}-${props.type}`,
|
`${prefixCls}-${attrs.type}`,
|
||||||
props.class,
|
attrs.class,
|
||||||
);
|
);
|
||||||
|
|
||||||
const cancelButton = okCancel && (
|
const cancelButton = okCancel && (
|
||||||
|
@ -83,12 +80,12 @@ export default {
|
||||||
>
|
>
|
||||||
<div class={`${contentPrefixCls}-body-wrapper`}>
|
<div class={`${contentPrefixCls}-body-wrapper`}>
|
||||||
<div class={`${contentPrefixCls}-body`}>
|
<div class={`${contentPrefixCls}-body`}>
|
||||||
{typeof icon === 'function' ? icon(h) : icon}
|
{typeof icon === 'function' ? icon() : icon}
|
||||||
{props.title === undefined ? null : (
|
{attrs.title === undefined ? null : (
|
||||||
<span class={`${contentPrefixCls}-title`}>{props.title}</span>
|
<span class={`${contentPrefixCls}-title`}>{attrs.title}</span>
|
||||||
)}
|
)}
|
||||||
<div class={`${contentPrefixCls}-content`}>
|
<div class={`${contentPrefixCls}-content`}>
|
||||||
{typeof props.content === 'function' ? props.content(h) : props.content}
|
{typeof attrs.content === 'function' ? attrs.content() : attrs.content}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class={`${contentPrefixCls}-btns`}>
|
<div class={`${contentPrefixCls}-btns`}>
|
||||||
|
@ -106,5 +103,6 @@ export default {
|
||||||
</div>
|
</div>
|
||||||
</Dialog>
|
</Dialog>
|
||||||
);
|
);
|
||||||
},
|
|
||||||
};
|
};
|
||||||
|
ConfirmDialog.inheritAttrs = false;
|
||||||
|
export default ConfirmDialog;
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import { inject } from 'vue';
|
||||||
import classNames from 'classnames';
|
import classNames from 'classnames';
|
||||||
import Dialog from '../vc-dialog';
|
import Dialog from '../vc-dialog';
|
||||||
import PropTypes from '../_util/vue-types';
|
import PropTypes from '../_util/vue-types';
|
||||||
|
@ -8,14 +9,7 @@ import Button from '../button';
|
||||||
import buttonTypes from '../button/buttonTypes';
|
import buttonTypes from '../button/buttonTypes';
|
||||||
const ButtonType = buttonTypes().type;
|
const ButtonType = buttonTypes().type;
|
||||||
import LocaleReceiver from '../locale-provider/LocaleReceiver';
|
import LocaleReceiver from '../locale-provider/LocaleReceiver';
|
||||||
import {
|
import { initDefaultProps, getComponent, getSlot } from '../_util/props-util';
|
||||||
initDefaultProps,
|
|
||||||
getComponentFromProp,
|
|
||||||
getClass,
|
|
||||||
getStyle,
|
|
||||||
mergeProps,
|
|
||||||
getListeners,
|
|
||||||
} from '../_util/props-util';
|
|
||||||
import { ConfigConsumerProps } from '../config-provider';
|
import { ConfigConsumerProps } from '../config-provider';
|
||||||
|
|
||||||
let mousePosition = null;
|
let mousePosition = null;
|
||||||
|
@ -116,8 +110,10 @@ export default {
|
||||||
this.sVisible = val;
|
this.sVisible = val;
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
inject: {
|
setup() {
|
||||||
configProvider: { default: () => ConfigConsumerProps },
|
return {
|
||||||
|
configProvider: inject('configProvider', ConfigConsumerProps),
|
||||||
|
};
|
||||||
},
|
},
|
||||||
// static info: ModalFunc;
|
// static info: ModalFunc;
|
||||||
// static success: ModalFunc;
|
// static success: ModalFunc;
|
||||||
|
@ -128,6 +124,7 @@ export default {
|
||||||
methods: {
|
methods: {
|
||||||
handleCancel(e) {
|
handleCancel(e) {
|
||||||
this.$emit('cancel', e);
|
this.$emit('cancel', e);
|
||||||
|
this.$emit('update:visible', false);
|
||||||
this.$emit('change', false);
|
this.$emit('change', false);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -136,26 +133,19 @@ export default {
|
||||||
},
|
},
|
||||||
renderFooter(locale) {
|
renderFooter(locale) {
|
||||||
const { okType, confirmLoading } = this;
|
const { okType, confirmLoading } = this;
|
||||||
const cancelBtnProps = mergeProps(
|
const cancelBtnProps = { onClick: this.handleCancel, ...(this.cancelButtonProps || {}) };
|
||||||
{ on: { click: this.handleCancel } },
|
const okBtnProps = {
|
||||||
this.cancelButtonProps || {},
|
onClick: this.handleOk,
|
||||||
);
|
|
||||||
const okBtnProps = mergeProps(
|
|
||||||
{
|
|
||||||
on: { click: this.handleOk },
|
|
||||||
props: {
|
|
||||||
type: okType,
|
type: okType,
|
||||||
loading: confirmLoading,
|
loading: confirmLoading,
|
||||||
},
|
...(this.okButtonProps || {}),
|
||||||
},
|
};
|
||||||
this.okButtonProps || {},
|
|
||||||
);
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<Button {...cancelBtnProps}>
|
<Button {...cancelBtnProps}>
|
||||||
{getComponentFromProp(this, 'cancelText') || locale.cancelText}
|
{getComponent(this, 'cancelText') || locale.cancelText}
|
||||||
</Button>
|
</Button>
|
||||||
<Button {...okBtnProps}>{getComponentFromProp(this, 'okText') || locale.okText}</Button>
|
<Button {...okBtnProps}>{getComponent(this, 'okText') || locale.okText}</Button>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
@ -168,11 +158,9 @@ export default {
|
||||||
wrapClassName,
|
wrapClassName,
|
||||||
centered,
|
centered,
|
||||||
getContainer,
|
getContainer,
|
||||||
$slots,
|
|
||||||
$scopedSlots,
|
|
||||||
$attrs,
|
$attrs,
|
||||||
} = this;
|
} = this;
|
||||||
const children = $scopedSlots.default ? $scopedSlots.default() : $slots.default;
|
const children = getSlot(this);
|
||||||
const { getPrefixCls, getPopupContainer: getContextPopupContainer } = this.configProvider;
|
const { getPrefixCls, getPopupContainer: getContextPopupContainer } = this.configProvider;
|
||||||
const prefixCls = getPrefixCls('modal', customizePrefixCls);
|
const prefixCls = getPrefixCls('modal', customizePrefixCls);
|
||||||
|
|
||||||
|
@ -180,20 +168,20 @@ export default {
|
||||||
<LocaleReceiver
|
<LocaleReceiver
|
||||||
componentName="Modal"
|
componentName="Modal"
|
||||||
defaultLocale={getConfirmLocale()}
|
defaultLocale={getConfirmLocale()}
|
||||||
scopedSlots={{ default: this.renderFooter }}
|
children={this.renderFooter}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
const closeIcon = getComponentFromProp(this, 'closeIcon');
|
const closeIcon = getComponent(this, 'closeIcon');
|
||||||
const closeIconToRender = (
|
const closeIconToRender = (
|
||||||
<span class={`${prefixCls}-close-x`}>
|
<span class={`${prefixCls}-close-x`}>
|
||||||
{closeIcon || <CloseOutlined class={`${prefixCls}-close-icon`} />}
|
{closeIcon || <CloseOutlined class={`${prefixCls}-close-icon`} />}
|
||||||
</span>
|
</span>
|
||||||
);
|
);
|
||||||
const footer = getComponentFromProp(this, 'footer');
|
const footer = getComponent(this, 'footer');
|
||||||
const title = getComponentFromProp(this, 'title');
|
const title = getComponent(this, 'title');
|
||||||
const dialogProps = {
|
const dialogProps = {
|
||||||
props: {
|
|
||||||
...this.$props,
|
...this.$props,
|
||||||
|
...$attrs,
|
||||||
getContainer: getContainer === undefined ? getContextPopupContainer : getContainer,
|
getContainer: getContainer === undefined ? getContextPopupContainer : getContainer,
|
||||||
prefixCls,
|
prefixCls,
|
||||||
wrapClassName: classNames({ [`${prefixCls}-centered`]: !!centered }, wrapClassName),
|
wrapClassName: classNames({ [`${prefixCls}-centered`]: !!centered }, wrapClassName),
|
||||||
|
@ -202,14 +190,7 @@ export default {
|
||||||
visible,
|
visible,
|
||||||
mousePosition,
|
mousePosition,
|
||||||
closeIcon: closeIconToRender,
|
closeIcon: closeIconToRender,
|
||||||
},
|
onClose: this.handleCancel,
|
||||||
on: {
|
|
||||||
...getListeners(this),
|
|
||||||
close: this.handleCancel,
|
|
||||||
},
|
|
||||||
class: getClass(this),
|
|
||||||
style: getStyle(this),
|
|
||||||
attrs: $attrs,
|
|
||||||
};
|
};
|
||||||
return <Dialog {...dialogProps}>{children}</Dialog>;
|
return <Dialog {...dialogProps}>{children}</Dialog>;
|
||||||
},
|
},
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import Vue from 'vue';
|
import { createApp } from 'vue';
|
||||||
import ConfirmDialog from './ConfirmDialog';
|
import ConfirmDialog from './ConfirmDialog';
|
||||||
import { destroyFns } from './Modal';
|
import { destroyFns } from './Modal';
|
||||||
import Base from '../base';
|
|
||||||
import Omit from 'omit.js';
|
import Omit from 'omit.js';
|
||||||
|
|
||||||
export default function confirm(config) {
|
export default function confirm(config) {
|
||||||
|
@ -12,7 +12,7 @@ export default function confirm(config) {
|
||||||
let currentConfig = { ...Omit(config, ['parentContext']), close, visible: true };
|
let currentConfig = { ...Omit(config, ['parentContext']), close, visible: true };
|
||||||
|
|
||||||
let confirmDialogInstance = null;
|
let confirmDialogInstance = null;
|
||||||
const confirmDialogProps = { props: {} };
|
let confirmDialogProps = {};
|
||||||
function close(...args) {
|
function close(...args) {
|
||||||
destroy(...args);
|
destroy(...args);
|
||||||
}
|
}
|
||||||
|
@ -21,11 +21,11 @@ export default function confirm(config) {
|
||||||
...currentConfig,
|
...currentConfig,
|
||||||
...newConfig,
|
...newConfig,
|
||||||
};
|
};
|
||||||
confirmDialogProps.props = currentConfig;
|
Object.assign(confirmDialogInstance, currentConfig);
|
||||||
}
|
}
|
||||||
function destroy(...args) {
|
function destroy(...args) {
|
||||||
if (confirmDialogInstance && div.parentNode) {
|
if (confirmDialogInstance && div.parentNode) {
|
||||||
confirmDialogInstance.$destroy();
|
confirmDialogInstance.unmount(div);
|
||||||
confirmDialogInstance = null;
|
confirmDialogInstance = null;
|
||||||
div.parentNode.removeChild(div);
|
div.parentNode.removeChild(div);
|
||||||
}
|
}
|
||||||
|
@ -43,10 +43,8 @@ export default function confirm(config) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function render(props) {
|
function render(props) {
|
||||||
confirmDialogProps.props = props;
|
confirmDialogProps = props;
|
||||||
const V = Base.Vue || Vue;
|
return createApp({
|
||||||
return new V({
|
|
||||||
el,
|
|
||||||
parent: config.parentContext,
|
parent: config.parentContext,
|
||||||
data() {
|
data() {
|
||||||
return { confirmDialogProps };
|
return { confirmDialogProps };
|
||||||
|
@ -56,7 +54,7 @@ export default function confirm(config) {
|
||||||
const cdProps = { ...this.confirmDialogProps };
|
const cdProps = { ...this.confirmDialogProps };
|
||||||
return <ConfirmDialog {...cdProps} />;
|
return <ConfirmDialog {...cdProps} />;
|
||||||
},
|
},
|
||||||
});
|
}).mount(el);
|
||||||
}
|
}
|
||||||
|
|
||||||
confirmDialogInstance = render(currentConfig);
|
confirmDialogInstance = render(currentConfig);
|
||||||
|
|
|
@ -4,7 +4,6 @@ import InfoCircleOutlined from '@ant-design/icons-vue/InfoCircleOutlined';
|
||||||
import CheckCircleOutlined from '@ant-design/icons-vue/CheckCircleOutlined';
|
import CheckCircleOutlined from '@ant-design/icons-vue/CheckCircleOutlined';
|
||||||
import CloseCircleOutlined from '@ant-design/icons-vue/CloseCircleOutlined';
|
import CloseCircleOutlined from '@ant-design/icons-vue/CloseCircleOutlined';
|
||||||
import ExclamationCircleOutlined from '@ant-design/icons-vue/ExclamationCircleOutlined';
|
import ExclamationCircleOutlined from '@ant-design/icons-vue/ExclamationCircleOutlined';
|
||||||
import Base from '../base';
|
|
||||||
|
|
||||||
// export { ActionButtonProps } from './ActionButton'
|
// export { ActionButtonProps } from './ActionButton'
|
||||||
// export { ModalProps, ModalFuncProps } from './Modal'
|
// export { ModalProps, ModalFuncProps } from './Modal'
|
||||||
|
@ -12,9 +11,7 @@ import Base from '../base';
|
||||||
const info = function(props) {
|
const info = function(props) {
|
||||||
const config = {
|
const config = {
|
||||||
type: 'info',
|
type: 'info',
|
||||||
icon: h => {
|
icon: <InfoCircleOutlined />,
|
||||||
return <InfoCircleOutlined />;
|
|
||||||
},
|
|
||||||
okCancel: false,
|
okCancel: false,
|
||||||
...props,
|
...props,
|
||||||
};
|
};
|
||||||
|
@ -24,9 +21,7 @@ const info = function(props) {
|
||||||
const success = function(props) {
|
const success = function(props) {
|
||||||
const config = {
|
const config = {
|
||||||
type: 'success',
|
type: 'success',
|
||||||
icon: h => {
|
icon: <CheckCircleOutlined />,
|
||||||
return <CheckCircleOutlined />;
|
|
||||||
},
|
|
||||||
okCancel: false,
|
okCancel: false,
|
||||||
...props,
|
...props,
|
||||||
};
|
};
|
||||||
|
@ -36,9 +31,7 @@ const success = function(props) {
|
||||||
const error = function(props) {
|
const error = function(props) {
|
||||||
const config = {
|
const config = {
|
||||||
type: 'error',
|
type: 'error',
|
||||||
icon: h => {
|
icon: <CloseCircleOutlined />,
|
||||||
return <CloseCircleOutlined />;
|
|
||||||
},
|
|
||||||
okCancel: false,
|
okCancel: false,
|
||||||
...props,
|
...props,
|
||||||
};
|
};
|
||||||
|
@ -48,9 +41,7 @@ const error = function(props) {
|
||||||
const warning = function(props) {
|
const warning = function(props) {
|
||||||
const config = {
|
const config = {
|
||||||
type: 'warning',
|
type: 'warning',
|
||||||
icon: h => {
|
icon: <ExclamationCircleOutlined />,
|
||||||
return <ExclamationCircleOutlined />;
|
|
||||||
},
|
|
||||||
okCancel: false,
|
okCancel: false,
|
||||||
...props,
|
...props,
|
||||||
};
|
};
|
||||||
|
@ -83,9 +74,8 @@ Modal.destroyAll = function destroyAllFn() {
|
||||||
};
|
};
|
||||||
|
|
||||||
/* istanbul ignore next */
|
/* istanbul ignore next */
|
||||||
Modal.install = function(Vue) {
|
Modal.install = function(app) {
|
||||||
Vue.use(Base);
|
app.component(Modal.name, Modal);
|
||||||
Vue.component(Modal.name, Modal);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
export default Modal;
|
export default Modal;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import { provide, Transition } from 'vue';
|
import { provide, Transition } from 'vue';
|
||||||
import { initDefaultProps } from '../_util/props-util';
|
import { initDefaultProps, getSlot } from '../_util/props-util';
|
||||||
import KeyCode from '../_util/KeyCode';
|
import KeyCode from '../_util/KeyCode';
|
||||||
import contains from '../vc-util/Dom/contains';
|
import contains from '../vc-util/Dom/contains';
|
||||||
import LazyRenderBox from './LazyRenderBox';
|
import LazyRenderBox from './LazyRenderBox';
|
||||||
|
@ -49,6 +49,7 @@ function offset(el) {
|
||||||
let cacheOverflow = {};
|
let cacheOverflow = {};
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
name: 'VcDialog',
|
||||||
mixins: [BaseMixin],
|
mixins: [BaseMixin],
|
||||||
props: initDefaultProps(IDialogPropTypes, {
|
props: initDefaultProps(IDialogPropTypes, {
|
||||||
mask: true,
|
mask: true,
|
||||||
|
@ -64,6 +65,9 @@ export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
destroyPopup: false,
|
destroyPopup: false,
|
||||||
|
inTransition: false,
|
||||||
|
titleId: `rcDialogTitle${uuid++}`,
|
||||||
|
dialogMouseDown: undefined,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -80,11 +84,6 @@ export default {
|
||||||
created() {
|
created() {
|
||||||
provide('dialogContext', this);
|
provide('dialogContext', this);
|
||||||
},
|
},
|
||||||
|
|
||||||
beforeMount() {
|
|
||||||
this.inTransition = false;
|
|
||||||
this.titleId = `rcDialogTitle${uuid++}`;
|
|
||||||
},
|
|
||||||
mounted() {
|
mounted() {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.updatedCallback(false);
|
this.updatedCallback(false);
|
||||||
|
@ -285,7 +284,7 @@ export default {
|
||||||
{closer}
|
{closer}
|
||||||
{header}
|
{header}
|
||||||
<div key="body" class={`${prefixCls}-body`} style={bodyStyle} ref="body" {...bodyProps}>
|
<div key="body" class={`${prefixCls}-body`} style={bodyStyle} ref="body" {...bodyProps}>
|
||||||
{this.$slots.default}
|
{getSlot(this)}
|
||||||
</div>
|
</div>
|
||||||
{footer}
|
{footer}
|
||||||
</div>
|
</div>
|
||||||
|
@ -320,22 +319,24 @@ export default {
|
||||||
let maskElement;
|
let maskElement;
|
||||||
if (props.mask) {
|
if (props.mask) {
|
||||||
const maskTransition = this.getMaskTransitionName();
|
const maskTransition = this.getMaskTransitionName();
|
||||||
maskElement = (
|
const tempMaskElement = (
|
||||||
<LazyRenderBox
|
<LazyRenderBox
|
||||||
v-show={props.visible}
|
v-show={props.visible}
|
||||||
style={this.getMaskStyle()}
|
style={this.getMaskStyle()}
|
||||||
key="mask"
|
key="mask"
|
||||||
class={`${props.prefixCls}-mask`}
|
class={`${props.prefixCls}-mask`}
|
||||||
{...props.maskProps}
|
{...(props.maskProps || {})}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
if (maskTransition) {
|
if (maskTransition) {
|
||||||
const maskTransitionProps = getTransitionProps(maskTransition);
|
const maskTransitionProps = getTransitionProps(maskTransition);
|
||||||
maskElement = (
|
maskElement = (
|
||||||
<Transition key="mask" {...maskTransitionProps}>
|
<Transition key="mask" {...maskTransitionProps}>
|
||||||
{maskElement}
|
{tempMaskElement}
|
||||||
</Transition>
|
</Transition>
|
||||||
);
|
);
|
||||||
|
} else {
|
||||||
|
maskElement = tempMaskElement;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return maskElement;
|
return maskElement;
|
||||||
|
|
|
@ -28,6 +28,7 @@ import Popconfirm from 'ant-design-vue/popconfirm';
|
||||||
import Popover from 'ant-design-vue/popover';
|
import Popover from 'ant-design-vue/popover';
|
||||||
import notification from 'ant-design-vue/notification';
|
import notification from 'ant-design-vue/notification';
|
||||||
import message from 'ant-design-vue/message';
|
import message from 'ant-design-vue/message';
|
||||||
|
import Modal from 'ant-design-vue/modal';
|
||||||
import 'ant-design-vue/style.js';
|
import 'ant-design-vue/style.js';
|
||||||
|
|
||||||
const app = createApp(App);
|
const app = createApp(App);
|
||||||
|
@ -59,4 +60,5 @@ app
|
||||||
.use(Tag)
|
.use(Tag)
|
||||||
.use(Popconfirm)
|
.use(Popconfirm)
|
||||||
.use(Popover)
|
.use(Popover)
|
||||||
|
.use(Modal)
|
||||||
.mount('#app');
|
.mount('#app');
|
||||||
|
|
Loading…
Reference in New Issue