How to delete the current picture by using the el-upload component of element-UI? click to determine the background return value and then delete the image.

  1. when uploading an image using element-UI, click the delete button for the uploaded image filelist, and the pop-up confirmation button starts to request the backend, and then delete the image after the correct result is returned by the backend.
  2. Code:
  Link description  

Mar.20,2021
In

upload, there is a before-remove-the hook before deleting the file. The parameter is the uploaded file and the file list. If false or Promise is returned and reject, is returned, the deletion will be stopped. It was written in the document.
Pop-up confirmation in before-remove


my solution is:

methods:{
  reqDeletePic (file,fileList) {
      this.$confirm(', ?', '', {
                    confirmButtonText: '',
                    cancelButtonText: '',
                    type: 'warning'
                }).then(() => {
                    this.asyncReq(file,fileList) // 
                }).catch(() => {
                    this.$message({
                        type: 'info',
                        message: ''
                    });
                });
       return false; // ,false
      },
    asyncReq (file,fileList) {
        // 
        // fileListfile
    }
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-1b3c186-2c2f2.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-1b3c186-2c2f2.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?