Skip to content

Commit fb6a940

Browse files
committed
Fix thread
1 parent 77e13e0 commit fb6a940

File tree

9 files changed

+50
-18
lines changed

9 files changed

+50
-18
lines changed

dist/example.js

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

dist/example.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/vue-upload-component.js

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

dist/vue-upload-component.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/vue-upload-component.min.js

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/vue-upload-component.min.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.

example/Home.vue

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,9 @@ table th,table td {
146146
<td>
147147
Drop active: {{upload.dropActive}}
148148
</td>
149+
<td>
150+
<label for="file">Click</label>
151+
</td>
149152
</tr>
150153
</tbody>
151154
</table>
@@ -231,4 +234,7 @@ export default {
231234
},
232235
},
233236
}
237+
238+
239+
234240
</script>

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": "2.3.0-beta.1",
4+
"version": "2.3.0-beta.2",
55
"author": "LianYue",
66
"scripts": {
77
"dev": "webpack-dev-server --inline --hot",

src/FileUpload.vue

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ export default {
108108
return {
109109
mode: 'html5',
110110
active: false,
111+
uploading: 0,
111112
uploaded: true,
112113
destroy: false,
113114
dropActive: false,
@@ -411,6 +412,9 @@ export default {
411412
412413
413414
_fileUploads() {
415+
if (this.uploading > 0) {
416+
this.uploading--
417+
}
414418
if (!this.active) {
415419
return;
416420
}
@@ -462,11 +466,15 @@ export default {
462466
continue;
463467
}
464468
}
469+
470+
this.uploading++
465471
return;
466472
}
467473
468-
this.active = false;
469-
this.uploaded = true;
474+
if (!this.uploading) {
475+
this.active = false;
476+
this.uploaded = true;
477+
}
470478
},
471479
472480

0 commit comments

Comments
 (0)