How to use FormData to clear the data in it at once

after each FormData request, there can only be one delete. How to clear the data in it

created() {
 axios.post(url.backstagelistTools, this.toolsListFormData)
  .then(response => {
    this.tableDataList = response.data.dataList;
    //toolsListFormData
    this.toolsListFormData.delete("XAuthToken")
    this.toolsListFormData.delete("pageString")
    this.toolsListFormData.delete("designerName")
    
  })
  .catch(function(error) {
    console.log(error);
  });
}

Apr.06,2022

this.toolsListFormData = null 

?


how about new one again? You just have to delete and write a loop.

let keys = toolsListFormData.keys();
keys.forEach(k=>{
  this.toolsListFormData.delete(k)
})

this.toolsListFormData=new FormData()

re-new.


re-new one, emptying it is no different from new a new one

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-1b37047-3440d.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-1b37047-3440d.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?