element-ui使用中碰到的问题
<template> <div> <el-button @click="clearFiles">重新上传</el-button> <el-upload ref="my-upload"> <el-button type="primary">点击上传</el-button> </el-upload> </div> </template> <script> export default { data(){ return { } }, methods: { clearFiles () { this.$refs['my-upload'].clearFiles(); } } }; </script>