element-ui的upload组件的clearFiles方法


1 <template>
2     <div>
3         <el-button @click="clearFiles">重新上传</el-button>
4         <el-upload ref="my-upload">
5             <el-button type="primary">点击上传</el-button>
6         </el-upload>
7     </div>
8 </template>

方法调用

 1 <script>
 2     export default {
 3         data(){
 4             return {
 5         }
 6     },
 7     methods: {
 8         clearFiles () {
 9             this.$refs['my-upload'].clearFiles();
10         }
11     }
12 };


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM