vue iview UPload,但文件上传是,clearFiles的使用方法
<template> <div> <button @click="clearUploadedImage">重新上传</button> <Upload ref="upload"><Upload> </div> </template> <script> export default { methods: { clearUploadedImage () {
该方法可以清楚所有的上传文件,用于清除失败后显示的文件 this.$refs.upload.clearFiles(); } } } </script>