lekhang2512 / vue-upload-multiple-image

A simple upload multiple image component for Vuejs
132 stars 50 forks source link

Do not clear the images after submitting to the api #68

Open Sfsohel opened 2 years ago

Sfsohel commented 2 years ago

I have a form to submit the server after submit all the given data was clear but the images was still there. How I remove or reset the component after submit.There is my code how I submit the data async saveDetais(){ this.dialogloading = true; let result = await axios.post(affiliate-visit/document/store,{files:this.files,contact_details:this.contact_details,document_time:this.time,affiliator_visit_id:this.item}); if (result.data) { this.cashoutSaveSuccess=true; this.$refs.anyName.reset(); this.files = []; this.dialog = false; } }

oldravian commented 2 years ago

force re-render the component reference: https://michaelnthiessen.com/force-re-render/