From 76499c4762ee4d2db260beb0d7c8c81310eca27a Mon Sep 17 00:00:00 2001 From: yaojn Date: Wed, 5 Nov 2025 14:31:11 +0800 Subject: [PATCH] =?UTF-8?q?-=20[=E4=BF=AE=E5=A4=8D]=E4=BF=AE=E5=A4=8D=20Ts?= =?UTF-8?q?FormInput=20=E7=BB=84=E4=BB=B6=E5=A4=B1=E7=84=A6=E6=97=B6?= =?UTF-8?q?=E8=87=AA=E5=8A=A8=E5=8E=BB=E9=99=A4=E9=A6=96=E5=B0=BE=E7=A9=BA?= =?UTF-8?q?=E6=A0=BC=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/resources/plugins/TsForm/TsFormInput.vue | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/resources/plugins/TsForm/TsFormInput.vue b/src/resources/plugins/TsForm/TsFormInput.vue index e8d1e457..7cac1f90 100755 --- a/src/resources/plugins/TsForm/TsFormInput.vue +++ b/src/resources/plugins/TsForm/TsFormInput.vue @@ -207,7 +207,7 @@ export default { if (!isSame) { if (this.currentValidList.length > 0 && this.canValid('change', this.currentValidList)) { - this.valid(this.currentValue); + this.valid(value); } } else { // this.validMesage = ''; // enter键回车会清空校验提示信息 @@ -230,10 +230,11 @@ export default { this.$emit('on-clear'); }, onBlurValue: function() { - typeof this.onBlur == 'function' && this.onBlur(this.currentValue); + const value = typeof this.currentValue === 'string' ? this.currentValue.trim() : this.currentValue; + typeof this.onBlur == 'function' && this.onBlur(value); this.$emit('on-blur', this.currentValue); if (this.currentValidList.length > 0 && this.canValid('blur', this.currentValidList)) { - this.valid(this.currentValue); + this.valid(value); } }, onEvent(evt, type) { -- Gitee