From 4109caadd87c4a2f99a1035816a429768070db56 Mon Sep 17 00:00:00 2001 From: 吕庆安 Date: Sat, 30 Sep 2017 03:40:21 -0500 Subject: [PATCH] Update form-item.vue --- src/components/form/form-item.vue | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/components/form/form-item.vue b/src/components/form/form-item.vue index 01f6042..654f536 100644 --- a/src/components/form/form-item.vue +++ b/src/components/form/form-item.vue @@ -85,8 +85,13 @@ }, watch: { error (val) { - this.validateMessage = val; - this.validateState = 'error'; + if (val === '') { + this.validateMessage = ''; + this.validateState = ''; + } else { + this.validateMessage = val; + this.validateState = 'error'; + } }, validateStatus (val) { this.validateState = val; @@ -246,4 +251,4 @@ this.dispatch('iForm', 'on-form-item-remove', this); } }; - \ No newline at end of file + -- libgit2 0.21.4