Skip to content

Commit 1a3e5e4

Browse files
committed
apply @CyferZ solution to fix issue#11
1 parent 55dab23 commit 1a3e5e4

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,13 +52,13 @@ Vue component that provides drag and drop images upload with preview.
5252
5353
## Events
5454
55-
### <b>@change</b>
55+
### <b>@changed</b>
5656
Fired when new images are added or deleted it always returns uploaded files
5757
5858
Template:
5959
6060
```html
61-
<UploadImages @change="handleImages"/>
61+
<UploadImages @changed="handleImages"/>
6262
```
6363
6464
Script:

dist/vue-upload-drop-images.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ export default {
6666
deleteImg(index) {
6767
this.Imgs.splice(index, 1);
6868
this.files.splice(index, 1);
69-
this.$emit("change", this.files);
69+
this.$emit("changed", this.files);
7070
this.$refs.uploadInput.value = null;
7171
},
7272
previewImgs(event) {
@@ -82,7 +82,7 @@ export default {
8282
}
8383
if (this.dropped == 0) this.files.push(...event.currentTarget.files);
8484
this.error = "";
85-
this.$emit("change", this.files);
85+
this.$emit("changed", this.files);
8686
let readers = [];
8787
if (!this.files.length) return;
8888
for (let i = 0; i < this.files.length; i++) {
@@ -96,7 +96,7 @@ export default {
9696
this.$refs.uploadInput.value = null;
9797
this.Imgs = [];
9898
this.files = [];
99-
this.$emit("change", this.files);
99+
this.$emit("changed", this.files);
100100
},
101101
},
102102
};

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "vue-upload-drop-images",
3-
"version": "1.0.6",
3+
"version": "1.0.7",
44
"description": "Vue component that provides drag and drop images upload with preview",
55
"main": "dist/vue-upload-drop-images.vue",
66
"repository": {

0 commit comments

Comments
 (0)