Browse Source

支持Modal弹框自定义标题

RuoYi 1 year ago
parent
commit
295c0f2ced
1 changed files with 4 additions and 4 deletions
  1. 4 4
      plugins/modal.js

+ 4 - 4
plugins/modal.js

@@ -25,18 +25,18 @@ export default {
     uni.hideToast()
   },
   // 弹出提示
-  alert(content) {
+  alert(content, title) {
     uni.showModal({
-      title: '提示',
+      title: title || '系统提示',
       content: content,
       showCancel: false
     })
   },
   // 确认窗体
-  confirm(content) {
+  confirm(content, title) {
     return new Promise((resolve, reject) => {
       uni.showModal({
-        title: '系统提示',
+        title: title || '系统提示',
         content: content,
         cancelText: '取消',
         confirmText: '确定',