}).catch(() =>{this.$message.error(`文件“${file.name}”删除失败`); }); } }, uploadSuccess(response) {if(response) {this.$message({message: '文件上传成功', type: 'success'});this.$emit('uploadSuccess', response); } }, uploadError(err, file) {if(err) {this.$message.error(...
},//点击预览图标,预览图片handlePictureCardPreview(file) {this.dialogImageUrl =file.urlthis.dialogVisible =true},//文件列表移除文件时的钩子handleRemove(file, fileList) {if(this.isEdit) {this.picUploadList.splice(this.delIndex, 1)this.$emit('update:fileList',this.picUploadList) }else{ const ...
点击图片上传,清空验证结果,并且修改验证对象kfFormRules,移除里面关于头像上传的条件headImg,这些逻辑需要在on-change中去实现,然后在点击确定就不会有关于headImg的验证,具体可以看上图标出的控制台提示。 代码实现如下: codeChange(file, fileList) { this.codeFile = file; this.codeFileList = fileList; if(fil...
},//点击预览图标,预览图片handlePictureCardPreview(file) {this.dialogImageUrl =file.urlthis.dialogVisible =true},//文件列表移除文件时的钩子handleRemove(file, fileList) {if(this.isEdit) {this.picUploadList.splice(this.delIndex, 1)this.$emit('update:fileList',this.picUploadList) }else{ const ...