element-ui——el-upload 上传成功后清空文件

<el-upload action="#" ref="upload" list-type="picture" :show-file-list="true" :limit="1" :http-request="handleUpload">
    <el-button size="small" type="primary">上传</el-button>
</el-upload>

<button @click="doClear">
    清空
</button>
methods: {
    doClear () {
        this.$refs.upload.clearFiles()
    }
}


上一篇:photoshop切图


下一篇:Vue+elementUI拓扑图管理-index.vue