Skip to content

Commit 90c80e5

Browse files
committed
Added 'method' as prop. Added String as a valid format to 'clickable' prop.
1 parent 5142cb9 commit 90c80e5

File tree

4 files changed

+20
-15
lines changed

4 files changed

+20
-15
lines changed

dev/bundle.js

Lines changed: 7 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dev/bundle.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/vue2-dropzone.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/index.vue

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
required: true
1717
},
1818
clickable: {
19-
type: Boolean,
19+
type: [Boolean, String],
2020
default: true
2121
},
2222
paramName: {
@@ -68,7 +68,7 @@
6868
default: (options) => {
6969
return `
7070
<div class="dz-preview dz-file-preview">
71-
<div class="dz-image" style="width: ${options.thumbnailWidth}px;height: ${options.thumbnailHeight}px">
71+
<div class="dz-image" style="width: ${options.thumbnailWidth}px;height: ${options.thumbnailHeight}px">
7272
<img data-dz-thumbnail /></div>
7373
<div class="dz-details">
7474
<div class="dz-size"><span data-dz-size></span></div>
@@ -128,13 +128,17 @@
128128
type : Number,
129129
default : 30000
130130
},
131+
method:{
132+
type : String,
133+
default : 'POST'
134+
}
131135
},
132136
methods: {
133137
manuallyAddFile: function (file, fileUrl, callback, crossOrigin, options) {
134138
this.dropzone.emit("addedfile", file);
135139
this.dropzone.emit("thumbnail", file, fileUrl);
136140
this.dropzone.createThumbnailFromUrl(file, fileUrl, callback, crossOrigin);
137-
this.dropzone.emit("complete", file);
141+
this.dropzone.emit("complete", file);
138142
if ((typeof options.dontSubstractMaxFiles == 'undefined') || !options.dontSubstractMaxFiles) {
139143
this.dropzone.options['maxFiles'] = this.dropzone.options['maxFiles'] - 1;
140144
}
@@ -274,7 +278,8 @@
274278
resizeMethod : this.getProp(this.resizeMethod,this.dropzoneOptions.resizeMethod),
275279
uploadMultiple : this.getProp(this.uploadMultiple, this.dropzoneOptions.uploadMultiple),
276280
parallelUploads : this.getProp(this.parallelUploads, this.dropzoneOptions.parallelUploads),
277-
timeout : this.getProp(this.timeout, this.dropzoneOptions.timeout)
281+
timeout : this.getProp(this.timeout, this.dropzoneOptions.timeout),
282+
method : this.getProp(this.method, this.dropzoneOptions.method)
278283
})
279284
280285
// Handle the dropzone events
@@ -299,7 +304,7 @@
299304
}
300305
}
301306
}
302-
307+
303308
vm.$emit('vdropzone-file-added', file)
304309
});
305310

0 commit comments

Comments
 (0)