Uncaught Error: Dropzone already attached.
at new t (eval at
Is it possible to change this?
Many thanks
I've just tested and having it twice is fine, just make sure each instance has a unique id
So for example
<dropzone id="myVueDropzone" url="https://httpbin.org/post"></dropzone>
<dropzone id="myVueDropzone2" url="https://httpbin.org/post"></dropzone>
Reopen the issue if you continue to run in to problems
thank you!
@rowanwins
Hi,
This is exactly what I need, but I add the component in a button click event.
I have a parent component that has an array of a child component. That child component uses the dropzone.
In my parent I start with 0 child components, and I append the child component in the button click event.
When I add the first instance of the child component the dropzone is also added, but when I add the second instance the id obviously stays the same. At that moment i get this error: [Vue warn]: Error in mounted hook: "Error: Dropzone already attached."
Do you have any idea how I can change the id of the dropzone at the moment I add the child component?
I've seached for an answer but I can't find anything specific for my problem.
Hi @thijs95
Can you post a snippet of your current setup.
Thanks
Here u go
Parent Template Child Template Thanks for the reply
<div class="panel">
<div class="panel-heading">
<h1 class="panel-title">Textueel+</h1>
</div>
<div class="panel-body">
<div class="form-group" id="app">
<div v-for="(n, idx) in textualplusitems">
<create-textualplusitem :index="idx" @textualChanged="onChange"></create-textualplusitem> <!-- Child component -->
<br>
<hr>
</div>
</div>
<button @click="add">Extra Textual+</button>
</div>
</div>
<div class="form-group">
<button @click="postSlideshowplus">Save</button>
</div>
Parent script
<div class="form-group">
<label for="text">Text</label>
<quill-editor id="text" :options="editorOption" v-model="text"></quill-editor>
</div>
<div class="form-group">
<label for="imageUploader">Photo:</label><br>
<dropzone id="imageUploader" url="/api/image" v-on:vdropzone-success="imageUploaded"></dropzone> <!-- The component I need to use more then once -->
</div>
</div>
Child Script
Most helpful comment
I've just tested and having it twice is fine, just make sure each instance has a unique
idSo for example
<dropzone id="myVueDropzone" url="https://httpbin.org/post"></dropzone> <dropzone id="myVueDropzone2" url="https://httpbin.org/post"></dropzone>Reopen the issue if you continue to run in to problems