Merge branch '2.0' into gh-pages

master
git 9 years ago
commit bfa1949ded

28
dist/example.js vendored

@ -8634,17 +8634,13 @@
"nav", "nav",
null, null,
[h( [h(
"h3", "h2",
null, null,
["Navigation"] ["Navigation"]
), h( ), h(
"h3", "h3",
null, null,
["Need to run local ", h( ["Please click on the navigation"]
"code",
null,
["`npm run dev`"]
)]
), h( ), h(
"ul", "ul",
null, null,
@ -9081,6 +9077,7 @@
return { return {
mode: 'html5', mode: 'html5',
active: false, active: false,
uploading: 0,
uploaded: true, uploaded: true,
destroy: false, destroy: false,
dropActive: false dropActive: false
@ -9354,6 +9351,9 @@
}); });
}, },
_fileUploads: function _fileUploads() { _fileUploads: function _fileUploads() {
if (this.uploading > 0) {
this.uploading--;
}
if (!this.active) { if (!this.active) {
return; return;
} }
@ -9405,11 +9405,15 @@
continue; continue;
} }
} }
this.uploading++;
return; return;
} }
this.active = false; if (!this.uploading) {
this.uploaded = true; this.active = false;
this.uploaded = true;
}
}, },
_fileUploadXhr: function _fileUploadXhr(xhr, file, data) { _fileUploadXhr: function _fileUploadXhr(xhr, file, data) {
var _self = this; var _self = this;
@ -11254,7 +11258,7 @@
_vm.$forceUpdate() _vm.$forceUpdate()
} }
} }
})])])]), _vm._v(" "), _c('tr', [_c('td', [_vm._v("\n Auto start: " + _vm._s(_vm.auto) + "\n ")]), _vm._v(" "), _c('td', [_vm._v("\n Active: " + _vm._s(_vm.upload.active) + "\n ")]), _vm._v(" "), _c('td', [_vm._v("\n Uploaded: " + _vm._s(_vm.upload.uploaded) + "\n ")]), _vm._v(" "), _c('td', [_vm._v("\n Drop active: " + _vm._s(_vm.upload.dropActive) + "\n ")])])])])]), _vm._v(" "), _c('div', { })])])]), _vm._v(" "), _c('tr', [_c('td', [_vm._v("\n Auto start: " + _vm._s(_vm.auto) + "\n ")]), _vm._v(" "), _c('td', [_vm._v("\n Active: " + _vm._s(_vm.upload.active) + "\n ")]), _vm._v(" "), _c('td', [_vm._v("\n Uploaded: " + _vm._s(_vm.upload.uploaded) + "\n ")]), _vm._v(" "), _c('td', [_vm._v("\n Drop active: " + _vm._s(_vm.upload.dropActive) + "\n ")]), _vm._v(" "), _vm._m(1)])])])]), _vm._v(" "), _c('div', {
directives: [{ directives: [{
name: "show", name: "show",
rawName: "v-show", rawName: "v-show",
@ -11265,6 +11269,12 @@
}, [_vm._v("\n Drop ing\n ")])]) }, [_vm._v("\n Drop ing\n ")])])
},staticRenderFns: [function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h; },staticRenderFns: [function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;
return _c('thead', [_c('tr', [_c('th', [_vm._v("Index")]), _vm._v(" "), _c('th', [_vm._v("ID")]), _vm._v(" "), _c('th', [_vm._v("Name")]), _vm._v(" "), _c('th', [_vm._v("Size")]), _vm._v(" "), _c('th', [_vm._v("Progress")]), _vm._v(" "), _c('th', [_vm._v("Speed")]), _vm._v(" "), _c('th', [_vm._v("Active")]), _vm._v(" "), _c('th', [_vm._v("Error")]), _vm._v(" "), _c('th', [_vm._v("Success")]), _vm._v(" "), _c('th', [_vm._v("Abort")]), _vm._v(" "), _c('th', [_vm._v("Delete")])])]) return _c('thead', [_c('tr', [_c('th', [_vm._v("Index")]), _vm._v(" "), _c('th', [_vm._v("ID")]), _vm._v(" "), _c('th', [_vm._v("Name")]), _vm._v(" "), _c('th', [_vm._v("Size")]), _vm._v(" "), _c('th', [_vm._v("Progress")]), _vm._v(" "), _c('th', [_vm._v("Speed")]), _vm._v(" "), _c('th', [_vm._v("Active")]), _vm._v(" "), _c('th', [_vm._v("Error")]), _vm._v(" "), _c('th', [_vm._v("Success")]), _vm._v(" "), _c('th', [_vm._v("Abort")]), _vm._v(" "), _c('th', [_vm._v("Delete")])])])
},function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;
return _c('td', [_c('label', {
attrs: {
"for": "file"
}
}, [_vm._v("Click")])])
}]} }]}
/***/ }, /***/ },

File diff suppressed because one or more lines are too long

@ -725,6 +725,7 @@ return /******/ (function(modules) { // webpackBootstrap
return { return {
mode: 'html5', mode: 'html5',
active: false, active: false,
uploading: 0,
uploaded: true, uploaded: true,
destroy: false, destroy: false,
dropActive: false dropActive: false
@ -998,6 +999,9 @@ return /******/ (function(modules) { // webpackBootstrap
}); });
}, },
_fileUploads: function _fileUploads() { _fileUploads: function _fileUploads() {
if (this.uploading > 0) {
this.uploading--;
}
if (!this.active) { if (!this.active) {
return; return;
} }
@ -1049,11 +1053,15 @@ return /******/ (function(modules) { // webpackBootstrap
continue; continue;
} }
} }
this.uploading++;
return; return;
} }
this.active = false; if (!this.uploading) {
this.uploaded = true; this.active = false;
this.uploaded = true;
}
}, },
_fileUploadXhr: function _fileUploadXhr(xhr, file, data) { _fileUploadXhr: function _fileUploadXhr(xhr, file, data) {
var _self = this; var _self = this;

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -146,6 +146,9 @@ table th,table td {
<td> <td>
Drop active: {{upload.dropActive}} Drop active: {{upload.dropActive}}
</td> </td>
<td>
<label for="file">Click</label>
</td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
@ -231,4 +234,7 @@ export default {
}, },
}, },
} }
</script> </script>

@ -1,7 +1,7 @@
{ {
"name": "vue-upload-component", "name": "vue-upload-component",
"description": "Vue.js file upload component, Support for multiple file uploads, progress, html5, html4, support ie9", "description": "Vue.js file upload component, Support for multiple file uploads, progress, html5, html4, support ie9",
"version": "2.3.0-beta.1", "version": "2.3.0-beta.2",
"author": "LianYue", "author": "LianYue",
"scripts": { "scripts": {
"dev": "webpack-dev-server --inline --hot", "dev": "webpack-dev-server --inline --hot",

@ -108,6 +108,7 @@ export default {
return { return {
mode: 'html5', mode: 'html5',
active: false, active: false,
uploading: 0,
uploaded: true, uploaded: true,
destroy: false, destroy: false,
dropActive: false, dropActive: false,
@ -411,6 +412,9 @@ export default {
_fileUploads() { _fileUploads() {
if (this.uploading > 0) {
this.uploading--
}
if (!this.active) { if (!this.active) {
return; return;
} }
@ -462,11 +466,15 @@ export default {
continue; continue;
} }
} }
this.uploading++
return; return;
} }
this.active = false; if (!this.uploading) {
this.uploaded = true; this.active = false;
this.uploaded = true;
}
}, },

Loading…
Cancel
Save