From 99b7b70cbcdd3e3f69731834212637bdda0e1dc6 Mon Sep 17 00:00:00 2001
From: Tevin <tingquanren@163.com>
Date: Wed, 23 Mar 2022 16:12:07 +0800
Subject: [PATCH] 修复CSwitchRadio在小程序中显示异常的问题

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

diff --git a/forms/input/CInput.vue b/forms/input/CInput.vue
index 95f98ff..74d986e 100644
--- a/forms/input/CInput.vue
+++ b/forms/input/CInput.vue
@@ -49,11 +49,15 @@
     },
     computed: {
         value() {
-            return (itemRes.formData[itemRes.name] || '').replace(/[\n\r]/g, '');
+            return (this.itemRes.formData[this.itemRes.name] || '').replace(
+                /[\n\r]/g,
+                ''
+            );
         },
     },
     methods: {
         hanldeChange(evt) {
+            // 小程序中,可以粘贴换行符进来
             const changeValue = (evt || '').replace(/[\n\r]/g, '');
             this.itemRes.onChange(changeValue);
         },

--
Gitblit v1.9.1