el-upload组件中清空已上传的文件列表,使用这个方法的时候,无效,没有被清空,报错了TypeError: this.$refs.upflieload.clearFiles is not a function。可是我搜了好多帖子都是这么用的,这个是什么原因呀,怎么才可以使用呀
<el-upload
ref="upflieload"
action="#"
accept=".jpg,.png,.jpeg,.docx,.xlsx"
multiple
:limit="3"
:http-request="httpRequest"
:on-preview="handlePreview"
:on-remove="handleRemove"
:before-remove="beforeRemove"
>
<el-button size="small" type="primary">点击上传</el-button>
</el-upload>
</div>
<el-button size="small" @click="clearFiles" type="primary"
>清空</el-button
>
clearFiles() {
this.$refs.upflieload.clearFiles();
},