I am using dropzone in vue js and would like to pass the index with the file to add the file to the corresponding array.
<div v-for="(lang, key) in $v.model.langs.$each.$iter" :key="key">
<Dropzone id="bar" ref="bar" @vdropzone-complete="vfileAdded" :options="options" :destroyDropzone="true" :useCustomSlot="true">
</Dropzone>
</div>
here is my method
vfileAdded(file) {
console.log(file)
},
In this case I get file to my method but if I using @vdropzone-complete="vfileAdded(file,key)"
and method
vfileAdded(file, key) {
console.log(file)
},
this I receives key parameter but file is undefined.
How can I pass file with key to my method vfileAdded