You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ant-design-vue/components/modal/index.js

69 lines
1.3 KiB

7 years ago
import Modal from './Modal'
import modalConfirm from './confirm'
7 years ago
// export { ActionButtonProps } from './ActionButton'
// export { ModalProps, ModalFuncProps } from './Modal'
const info = function (props) {
7 years ago
const config = {
type: 'info',
iconType: 'info-circle',
okCancel: false,
...props,
}
return modalConfirm(config)
7 years ago
}
const success = function (props) {
7 years ago
const config = {
type: 'success',
iconType: 'check-circle',
okCancel: false,
...props,
}
return modalConfirm(config)
7 years ago
}
const error = function (props) {
7 years ago
const config = {
type: 'error',
iconType: 'close-circle',
7 years ago
okCancel: false,
...props,
}
return modalConfirm(config)
7 years ago
}
const warning = function (props) {
7 years ago
const config = {
type: 'warning',
iconType: 'exclamation-circle',
okCancel: false,
...props,
}
return modalConfirm(config)
7 years ago
}
const warn = warning
7 years ago
const confirm = function (props) {
7 years ago
const config = {
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
7 years ago
/* istanbul ignore next */
Modal.install = function (Vue) {
Vue.component(Modal.name, Modal)
}
7 years ago
export default Modal