rowanwins / vue-dropzone

A Vue.js component for Dropzone.js - a drag’n’drop file uploads utility with image previews
https://rowanwins.github.io/vue-dropzone/docs/dist
MIT License
2.02k stars 1.4k forks source link

Remove the thumbnail with Custom Styling #550

Closed LukeDooms closed 4 years ago

LukeDooms commented 4 years ago

I'm referring to your online demo's. When using the Custom Styling, we cannot remove the file from the dropzone anymore. Is this a bug? Or is their a reason why is cannot be implemented?

rowanwins commented 4 years ago

Hi @LukeDooms

The suggested approach in dropzonejs doco is to use something like

<img src="removebutton.png" alt="Click me to remove the file." data-dz-remove />

data-dz-remove is the critical part apparently so presumably you could swap out the img element for a button or whatever and then style accordingly with css.

Hope that helps

LukeDooms commented 4 years ago

Thank you, works like a charm. Any way to restore the Default Message in the Custom Styling demo?

LukeDooms commented 4 years ago

Found it myself! Just put a class="dz-message" in the vue dropzone component, while setting :useCustomSlot=true Thanks for this wonderful product.