dropzone-nuxt

0.1.3 • Public • Published

dropzone-nuxt

npm (scoped with tag) npm Dependencies

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 to modules section of nuxt.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>
 
 

Package Sidebar

Install

npm i dropzone-nuxt

Weekly Downloads

96

Version

0.1.3

License

MIT

Unpacked Size

4.79 kB

Total Files

7

Last publish

Collaborators

  • schlunsen