From 4c07e237a361e9371d1df6ebd3f7a16db94a62b2 Mon Sep 17 00:00:00 2001
From: Tevin <tingquanren@163.com>
Date: Mon, 20 Mar 2023 16:54:17 +0800
Subject: [PATCH] 修复二维码组件性能消耗过大的问题

---
 forms/input/CInput.vue |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/forms/input/CInput.vue b/forms/input/CInput.vue
index d23c616..7c8d604 100644
--- a/forms/input/CInput.vue
+++ b/forms/input/CInput.vue
@@ -62,8 +62,10 @@
     },
     methods: {
         hanldeChange(evt) {
-            // 小程序中,可以粘贴换行符进来
-            const changeValue = ((evt || '') + '').replace(/[\n\r]/g, '');
+            // 去除首尾空格,小程序中还可以粘贴换行符进来
+            const changeValue = ((evt || '') + '')
+                .replace(/^\s+|\s+$/g, '')
+                .replace(/[\n\r\t]/g, '');
             this.itemRes.onChange(changeValue);
         },
     },

--
Gitblit v1.9.1