modal-sure.js 1.2 KB

1234567891011121314151617181920212223242526272829303132333435
  1. // +----------------------------------------------------------------------
  2. // | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
  3. // +----------------------------------------------------------------------
  4. // | Copyright (c) 2016~2025 https://www.crmeb.com All rights reserved.
  5. // +----------------------------------------------------------------------
  6. // | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
  7. // +----------------------------------------------------------------------
  8. // | Author: CRMEB Team <admin@crmeb.com>
  9. // +----------------------------------------------------------------------
  10. /**
  11. * 再次确定弹窗组件
  12. * @param title 标题
  13. * @returns {Promise<any>}
  14. */
  15. export default function modalSure(title) {
  16. return new Promise((resolve, reject) => {
  17. this.$confirm(`确定${title || '永久删除该数据'}`, '提示', {
  18. confirmButtonText: '确定',
  19. cancelButtonText: '取消',
  20. type: 'warning',
  21. customClass: 'deleteConfirm',
  22. })
  23. .then(() => {
  24. resolve();
  25. })
  26. .catch(() => {
  27. reject();
  28. this.$message({
  29. type: 'info',
  30. message: '已取消',
  31. });
  32. });
  33. });
  34. }