UNPKG

antd-fx67ll-test

Version:

这是一个测试着玩的私服antd项目,完全照抄v4.16.6的antd源码,请勿使用,仅做发布测试(因每次发布必须要升版本,如发现版本出入请忽略,与官方无关)

40 lines (30 loc) 849 B
import OriginModal, { destroyFns } from './Modal'; import confirm, { withWarn, withInfo, withSuccess, withError, withConfirm, modalGlobalConfig } from './confirm'; function modalWarn(props) { return confirm(withWarn(props)); } var Modal = OriginModal; Modal.info = function infoFn(props) { return confirm(withInfo(props)); }; Modal.success = function successFn(props) { return confirm(withSuccess(props)); }; Modal.error = function errorFn(props) { return confirm(withError(props)); }; Modal.warning = modalWarn; Modal.warn = modalWarn; Modal.confirm = function confirmFn(props) { return confirm(withConfirm(props)); }; Modal.destroyAll = function destroyAllFn() { while (destroyFns.length) { var close = destroyFns.pop(); if (close) { close(); } } }; Modal.config = modalGlobalConfig; export default Modal;