فهرست منبع

Merge branch 'master' of http://git.yvanui.com/jztd/yvan-ext

liupeng 3 سال پیش
والد
کامیت
c0fb8dc844
1فایلهای تغییر یافته به همراه14 افزوده شده و 5 حذف شده
  1. 14 5
      src/lib/systemLib.ts

+ 14 - 5
src/lib/systemLib.ts

@@ -1,7 +1,7 @@
 import _ from 'lodash'
 import {Lib, lookupScope} from './lib'
 import {ajax} from "./config";
-import {msg, showErrorDialog} from "../message";
+import {msg as msgSimple, showErrorDialog as showErrorDialogSimple} from "../message";
 import {evalFunction} from "./systemLibEval";
 
 export const SIMPLE_RE = /^(?:\{(?:(\d+)|([a-z_][\w\.]*))\})$/i
@@ -677,7 +677,7 @@ class SystemEventFu {
             invokeServer(groovyUrl, data).then(res => {
                 if (res.success) {
                     if (res.msg) {
-                        msg(res.msg)
+                        msgSimple(res.msg)
                     }
                     if (typeof successCallback === 'function') {
                         successCallback.call(scope, sender, res.data)
@@ -741,7 +741,7 @@ class SystemEventFu {
             invokeServer(groovyUrl, data).then(res => {
                 if (res.success) {
                     if (res.msg) {
-                        msg(res.msg)
+                        msgSimple(res.msg)
                     }
                     scope.dialogSuccess(res)
                 } else {
@@ -1085,7 +1085,16 @@ export function stopEvent(e) {
     e.cancelBubble = true;
 }
 
+/**
+ * 屏幕中央显示一个黑框提示
+ */
+export function msg(content) {
+    msgSimple(content)
+}
 
-export {
-    msg
+/**
+ * 错误对话框的强提醒
+ */
+export function showErrorDialog(msg, sender?) {
+    showErrorDialogSimple(msg, sender)
 }