CRMEB/template/admin/src/utils/modalSure.js
2022-09-01 11:47:49 +08:00

29 lines
1.1 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

// +----------------------------------------------------------------------
// | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
// +----------------------------------------------------------------------
// | Copyright (c) 2016~2022 https://www.crmeb.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
// +----------------------------------------------------------------------
// | Author: CRMEB Team <admin@crmeb.com>
// +----------------------------------------------------------------------
export function modelSure(formRequestPromise, Title) {
return new Promise((resolve, reject) => {
this.$Modal.confirm({
title: Title,
content: '<p>确定要删除吗?</p><p>删除后将无法恢复,请谨慎操作!</p>',
onOk: () => {
formRequestPromise
.then(({ data }) => {})
.catch(() => {
this.$Message.error('表单加载失败');
});
},
// onCancel: () => {
// this.$Message.info('取消成功');
// }
});
});
}