dropzone-nuxt
A Dropzone.js module for Nuxt.js.
Installation
$ npm i dropzone-nuxt --save
Setup
- Add
dropzone-nuxt
dependency using yarn or npm to your project - Add
dropzone-nuxt
tomodules
section ofnuxt.config.js
modules: // Simple usage 'dropzone-nuxt' // With options 'dropzone-nuxt' /* module options */
Usage
<template> <dropzone @vdropzone-file-added="onFileAdded" @vdropzone-error="onError" @vdropzone-success="onSuccess" @vdropzone-complete="onComplete" ref="myDropzone" id="dropzone" :options="dropzoneOptions" /></template> <script> export default { data() { return { dropzoneOptions: { url: 'https://httpbin.org/post', thumbnailWidth: 150, maxFilesize: 0.5, headers: { "My-Awesome-Header": "header value" } } } }, methods: { onFileAdded(e) { }, onError(e) { }, onSuccess(e) { }, onComplete(e) { } }} </script>