luoyifan 3 年之前
父節點
當前提交
a724ebcb1a
共有 2 個文件被更改,包括 21 次插入4 次删除
  1. 20 3
      dist/yvan-ext.js
  2. 1 1
      dist/yvan-ext.js.map

+ 20 - 3
dist/yvan-ext.js

@@ -61207,6 +61207,21 @@ define(['exports'], function (exports) { 'use strict';
     }
     //# sourceMappingURL=utils.js.map
 
+    function toString$2(value) {
+        if (typeof value === 'undefined') {
+            return "";
+        }
+        if (isNaN(value)) {
+            return "";
+        }
+        if (value == 'N/A') {
+            return "";
+        }
+        return ("" + value).trim();
+    }
+    function isEmpty(value) {
+        return lodash.size(value) <= 0;
+    }
     function createUUID() {
         //@ts-ignore
         return ([1e7] + -1e3 + -4e3 + -8e3 + -1e11).replace(/[018]/g, function (c) {
@@ -61343,7 +61358,6 @@ define(['exports'], function (exports) { 'use strict';
         var vm = extHandle.lookupViewModel();
         return vm.yvanScope;
     }
-    //# sourceMappingURL=lib.js.map
 
     /**
      * 全局 ajax 方法
@@ -63139,11 +63153,11 @@ define(['exports'], function (exports) { 'use strict';
                 var tmpErrFunc = function () {
                     grid.findPlugin('cellediting').startEdit(rowIndex, colIndex - 1); //如果不通过激活当前编辑状态
                 };
-                if (editor && !editor.allowBlank && lodash.size("" + value) <= 0) {
+                if (editor && !editor.allowBlank && isEmpty((value))) {
                     errFunc = tmpErrFunc;
                     return false;
                 }
-                if (editor && lodash.size("" + value) > 0 && !editor.validateValue(value)) {
+                if (editor && !isEmpty(value) && !editor.validateValue(value)) {
                     errFunc = tmpErrFunc;
                     return false;
                 }
@@ -63178,6 +63192,7 @@ define(['exports'], function (exports) { 'use strict';
             err: err
         };
     }
+    //# sourceMappingURL=systemLib.js.map
 
     var SystemLib = /*#__PURE__*/Object.freeze({
         __proto__: null,
@@ -131709,6 +131724,7 @@ define(['exports'], function (exports) { 'use strict';
     exports.init = init$1;
     exports.invokeServer = invokeServer;
     exports.isDesignMode = isDesignMode;
+    exports.isEmpty = isEmpty;
     exports.jquery = jquery;
     exports.json5 = dist;
     exports.keywordFilter = keywordFilter;
@@ -131732,6 +131748,7 @@ define(['exports'], function (exports) { 'use strict';
     exports.sqlUrlTransform = sqlUrlTransform;
     exports.stopEvent = stopEvent;
     exports.toPlainObject = toPlainObject;
+    exports.toString = toString$2;
     exports.tryEnable = tryEnable;
     exports.tryVarSimple = tryVarSimple;
     exports.tryWriteByExpress = tryWriteByExpress;

文件差異過大導致無法顯示
+ 1 - 1
dist/yvan-ext.js.map