How to clear uploaded files by element upload component

< el-col: span= "6" >

<el-upload
    :ref="upload"
    class="avatar-uploader"
    action="xx"
    :show-file-list="false"
    :on-success="handleAvatarSuccess"
    :on-change="beforeAvatarUpload">
    <img v-if="imageUrl" :src="imageUrl" class="avatar">
    <i v-else class="el-icon-plus avatar-uploader-icon"></i>
</el-upload>
<el-dialog :visible.sync="dialogVisible">
    <img width="100%" :src="dialogImageUrl" alt="">
    <p class="" @click="clear()">

</el-dialog>

< / el-col >

methods: {

  beforeAvatarUpload(file) {
      this.imageUrl = URL.createObjectURL(file.raw);
      this.dialogVisible = true;
      this.clearFiles()
  },
  clear(){
      alert("ok")
    this.$refs.upload.clearFiles()
    vm.$refs.upload.uploadFiles.length = 0
  }

}-sharp-sharp-sharp problem description

the environmental background of the problems and what methods you have tried

related codes

/ / Please paste the code text below (do not replace the code with pictures)

what result do you expect? What is the error message actually seen?

Jul.22,2021

Delete you to empty your url and not show it? this also requires background data deletion


: delete files in the on-remove callback


use
this.$refs.upload.clearFiles ();

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e50966-450d7.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e50966-450d7.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?