From c9985ada18c7303b12ffbefe5be24b00b5e849c6 Mon Sep 17 00:00:00 2001 From: 梁灏 Date: Fri, 15 Mar 2019 14:45:10 +0800 Subject: [PATCH] fix #5352 --- src/components/form/form-item.vue | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/components/form/form-item.vue b/src/components/form/form-item.vue index 88d3e29..d1e7846 100644 --- a/src/components/form/form-item.vue +++ b/src/components/form/form-item.vue @@ -84,9 +84,12 @@ }; }, watch: { - error (val) { - this.validateMessage = val; - this.validateState = val === '' ? '' : 'error'; + error: { + handler (val) { + this.validateMessage = val; + this.validateState = val ? 'error' : ''; + }, + immediate: true }, validateStatus (val) { this.validateState = val; -- libgit2 0.21.4