From df565b506ddb2bed918befceefddcd529eb58782 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期一, 17 八月 2020 00:18:17 +0800
Subject: [PATCH] 2020-08-17

---
 src/utils/utils.js |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/utils/utils.js b/src/utils/utils.js
index 7808f1e..e033b10 100644
--- a/src/utils/utils.js
+++ b/src/utils/utils.js
@@ -765,11 +765,11 @@
 
           val = val.replace(/(^\s*$)|\t*|\v*/ig, '')
 
-          if (!val && col.required === 'true') { // 蹇呭~鏍¢獙
+          if (!val && col.required === 'true') {            // 蹇呭~鏍¢獙
             errors.push(_position + dict['main.excel.content.emptyerror'])
-          } else if (val.length > col.limit) {    // 闀垮害鏍¢獙
+          } else if (col.limit && val.length > col.limit) { // 闀垮害鏍¢獙
             errors.push(_position + dict['main.excel.content.maxlimit'])
-          } else {                               // 鍏抽敭瀛楁牎楠�
+          } else {                                          // 鍏抽敭瀛楁牎楠�
             keys.forEach(key => {
               let _patten = new RegExp('(^' + key + '\\s+)|(\\s+' + key + '\\s+)', 'ig')
               if (_patten.test(val)) {

--
Gitblit v1.8.0