提交 2093182e 编写于 作者: terrfly's avatar terrfly

infoBox迁移自mgr;

上级 5e3448df
......@@ -9,25 +9,37 @@ import { Modal } from 'ant-design-vue'
// 确认提示: 标题, 内容, 点击确定回调函数, 取消回调, 扩展参数
export const confirmResult = {
confirm: function (title, content, okFunc, cancelFunc = (() => {}), extConfig = {}) {
Modal.confirm(
Object.assign({
okText: '确定',
cancelText: '取消',
title: title || '提示',
content: content,
onOk: okFunc,
onCancel: cancelFunc,
confirmLoading: true
}, extConfig))
},
confirmPrimary: function (title, content, okFunc, cancelFunc = (() => {}), extConfig = {}) {
this.confirm(title, content, okFunc, cancelFunc, Object.assign({ okType: 'primary' }, extConfig))
},
confirm: function (title, content, okFunc, cancelFunc = (() => {}), extConfig = {}) {
return Modal.confirm(
Object.assign({
okText: '确定',
cancelText: '取消',
title: title || '提示',
content: content,
onOk: okFunc,
onCancel: cancelFunc,
confirmLoading: true
}, extConfig))
},
confirmPrimary: function (title, content, okFunc, cancelFunc = (() => {}), extConfig = {}) {
return this.confirm(title, content, okFunc, cancelFunc, Object.assign({ okType: 'primary' }, extConfig))
},
confirmDanger: function (title, content, okFunc, cancelFunc = (() => {}), extConfig = {}) {
this.confirm(title, content, okFunc, cancelFunc, Object.assign({ okType: 'danger' }, extConfig))
}
confirmDanger: function (title, content, okFunc, cancelFunc = (() => {}), extConfig = {}) {
return this.confirm(title, content, okFunc, cancelFunc, Object.assign({ okType: 'danger' }, extConfig))
},
modalError: function (title, content, okFunc = (() => {})) {
return Modal.error({ title: title, content: content, onOk: okFunc })
},
modalSuccess: function (title, content, okFunc = (() => {})) {
return Modal.success({ title: title, content: content, onOk: okFunc })
},
modalWarning: function (title, content, okFunc = (() => {})) {
return Modal.warning({ title: title, content: content, onOk: okFunc })
}
}
export default confirmResult
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册