11<template >
2- <div id =" app" >
3- <p >
4- Welcome to your Vue.js app with dropzone!
5- </p >
6- <div v-if =" ok" >
7- <dropzone ref =" myVueDropzone" id =" dropzone" url =" https://httpbin.org/post"
8- v-on:vdropzone-success =" showSuccess"
9- v-bind:dropzone-options =" dropzoneOptions"
10- v-bind:use-custom-dropzone-options =" true" >
11- </dropzone >
2+ <div id =" app" >
3+ <p >
4+ Welcome to your Vue.js app with dropzone!
5+ </p >
6+ <div v-if =" ok" >
7+ <dropzone ref =" myVueDropzone" id =" dropzone" url =" https://httpbin.org/post"
8+ v-on:vdropzone-success =" showSuccess"
9+ v-bind:dropzone-options =" dropzoneOptions"
10+ v-bind:use-custom-dropzone-options =" false" >
11+ </dropzone >
12+ </div >
13+ <button v-on:click =" process" >process</button >
1214 </div >
13- <button v-on:click =" process" >process</button >
14- </div >
1515</template >
1616
1717<script >
18- import Dropzone from ' ../src/index'
19- export default {
20- name: ' MainApp' ,
21- components: {
22- Dropzone
23- },
24- data () {
25- return {
26- ok: true ,
27- dropzoneOptions: {autoProcessQueue: false }
28- }
29- },
30- methods: {
31- ' showSuccess ' : function (file ) {
32- console .log (' im added' )
33- console .log (this .$refs .myVueDropzone )
34- },
35- ' process ' : function () {
36- console .log (this .$refs .myVueDropzone )
37- // this.$refs.myVueDropzone.setOption('maxFiles', this.$refs.myVueDropzone.dropzone.options.maxFiles + 1)
38- console .log (this .$refs .myVueDropzone .dropzone .options .maxFiles )
39- }
18+ import Dropzone from ' ../src/index'
19+ export default {
20+ name: ' MainApp' ,
21+ components: {
22+ Dropzone
23+ },
24+ data () {
25+ return {
26+ ok: true ,
27+ dropzoneOptions: {autoProcessQueue: false }
28+ }
29+ },
30+ methods: {
31+ ' showSuccess ' : function (file ) {
32+ console .log (' im added' );
33+ console .log (this .$refs .myVueDropzone )
34+ },
35+ ' process ' : function () {
36+ console .log (this .$refs .myVueDropzone );
37+ // this.$refs.myVueDropzone.setOption('maxFiles', this.$refs.myVueDropzone.dropzone.options.maxFiles + 1)
38+ console .log (this .$refs .myVueDropzone .dropzone .options .maxFiles );
39+ }
40+ }
4041 }
41- }
4242 </script >
4343
4444<style scoped>
45- @import url (' ~dropzone/dist/dropzone.css' );
46- @import ' https://fonts.googleapis.com/css?family=Roboto' ;
45+ @import url (' ~dropzone/dist/dropzone.css' );
46+ @import ' https://fonts.googleapis.com/css?family=Roboto' ;
4747 </style >
0 commit comments