RuoYi
2025-12-18 873444dd0bcf718f8322dca198cbd5e7d9167ae5
ruoyi-ui/src/plugins/modal.js
@@ -1,6 +1,6 @@
import { Message, MessageBox, Notification, Loading } from 'element-ui'
let loadingInstance;
let loadingInstance
export default {
  // 消息提示
@@ -41,7 +41,7 @@
  },
  // 错误通知
  notifyError(content) {
    Notification.error(content);
    Notification.error(content)
  },
  // 成功通知
  notifySuccess(content) {
@@ -59,6 +59,14 @@
      type: "warning",
    })
  },
  // 提交内容
  prompt(content) {
    return MessageBox.prompt(content, "系统提示", {
      confirmButtonText: '确定',
      cancelButtonText: '取消',
      type: "warning",
    })
  },
  // 打开遮罩层
  loading(content) {
    loadingInstance = Loading.service({
@@ -70,6 +78,6 @@
  },
  // 关闭遮罩层
  closeLoading() {
    loadingInstance.close();
    loadingInstance.close()
  }
}