1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
import _extends from 'babel-runtime/helpers/extends';
import Modal from './Modal';
import modalConfirm from './confirm';
// export { ActionButtonProps } from './ActionButton'
// export { ModalProps, ModalFuncProps } from './Modal'
var info = function info(props) {
var config = _extends({
type: 'info',
iconType: 'info-circle',
okCancel: false
}, props);
return modalConfirm(config);
};
var success = function success(props) {
var config = _extends({
type: 'success',
iconType: 'check-circle',
okCancel: false
}, props);
return modalConfirm(config);
};
var error = function error(props) {
var config = _extends({
type: 'error',
iconType: 'close-circle',
okCancel: false
}, props);
return modalConfirm(config);
};
var warning = function warning(props) {
var config = _extends({
type: 'warning',
iconType: 'exclamation-circle',
okCancel: false
}, props);
return modalConfirm(config);
};
var warn = warning;
var confirm = function confirm(props) {
var config = _extends({
type: 'confirm',
okCancel: true
}, props);
return modalConfirm(config);
};
Modal.info = info;
Modal.success = success;
Modal.error = error;
Modal.warning = warning;
Modal.warn = warn;
Modal.confirm = confirm;
/* istanbul ignore next */
Modal.install = function (Vue) {
Vue.component(Modal.name, Modal);
};
export default Modal;