diff --git a/packages/agForm/src/index.vue b/packages/agForm/src/index.vue index 2b9dc5a..aaa4578 100644 --- a/packages/agForm/src/index.vue +++ b/packages/agForm/src/index.vue @@ -109,18 +109,25 @@ export default{ } }, mounted(){ - this.formValue=this.$attrs.value; + this.formValue=this.$attrs.value; + setTimeout(()=>{ + this.$refs.formref.clearValidate(); + },1); if(this.$refs.formref){ - for(const key in this.$refs.formref){ - if(!this[key]&&key!='value'){ - this[key]=this.$refs.formref[key]; - } - } - } + for(const key in this.$refs.formref){ + if(!this[key]&&key!='value'){ + this[key]=this.$refs.formref[key]; + } + } + } + }, watch:{ value(val){ this.formValue = val; + setTimeout(()=>{ + this.$refs.formref.clearValidate(); + },1); } }, methods:{