diff --git a/src/components/form/form-item.vue b/src/components/form/form-item.vue index 654f536..17fb988 100644 --- a/src/components/form/form-item.vue +++ b/src/components/form/form-item.vue @@ -85,13 +85,8 @@ }, watch: { error (val) { - if (val === '') { - this.validateMessage = ''; - this.validateState = ''; - } else { - this.validateMessage = val; - this.validateState = 'error'; - } + this.validateMessage = val; + this.validateState = val === '' ? '' : 'error'; }, validateStatus (val) { this.validateState = val; -- libgit2 0.21.4