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