Skip to content

Commit 99e9a05

Browse files
committed
add beforeDestroy
1 parent c64036f commit 99e9a05

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "vue-upload-component",
33
"description": "Vue.js file upload component, Support for multiple file uploads, progress, html5, html4, support ie9",
4-
"version": "0.1.9",
4+
"version": "0.1.10",
55
"author": "LianYue",
66
"scripts": {
77
"dev": "webpack-dev-server --inline --hot",

src/FileUpload.vue

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,12 @@ export default {
109109
this._index = 0;
110110
this._files = {};
111111
},
112+
113+
beforeDestroy() {
114+
this.active = false;
115+
this.files = [];
116+
},
117+
112118
watch: {
113119
files(files) {
114120
var ids = [];

0 commit comments

Comments
 (0)