解决方案: this.$forceUpdate()
this .uploadImg(formData) .then(res => { if (res.success == true ) { if (index == 0 ) { this .ruleForm.idcardphoto1 = res.file } else if (index == 1 ) { this .ruleForm.idcardphoto2 = res.file } this .$forceUpdate() } else { this .$message.error(res.error) } // this.uploadLoading[index] = false }) . catch (() => { //this.uploadLoading[index] = false }) |
loading