git 8 years ago
parent 993b56aca7
commit 062b6fd547

12
dist/example.js vendored

@ -8182,7 +8182,7 @@
if (newFile && oldFile) { if (newFile && oldFile) {
if (newFile.active && !oldFile.active) { if (newFile.active && !oldFile.active) {
if (newFile.size < 100 * 1024) { if (newFile.size >= 0 && newFile.size < 100 * 1024) {
newFile = this.$refs.upload.update(newFile, { error: 'size' }); newFile = this.$refs.upload.update(newFile, { error: 'size' });
} }
} }
@ -8913,8 +8913,6 @@
document.body.removeEventListener('keydown', onKeydown); document.body.removeEventListener('keydown', onKeydown);
iframe.parentNode && iframe.parentNode.removeChild(iframe);
if (!(file = self.get(file))) { if (!(file = self.get(file))) {
return reject(new Error('not_exists')); return reject(new Error('not_exists'));
} }
@ -8974,6 +8972,12 @@
form.submit(); form.submit();
}, 10); }, 10);
}).then(function (res) {
iframe.parentNode && iframe.parentNode.removeChild(iframe);
return res;
}).catch(function (res) {
iframe.parentNode && iframe.parentNode.removeChild(iframe);
return res;
}); });
}, },
watchActive: function watchActive(active) { watchActive: function watchActive(active) {
@ -8983,7 +8987,7 @@
while (file = this.files[index]) { while (file = this.files[index]) {
index++; index++;
if (active && !this.destroy) { if (active && !this.destroy) {
if (uploading >= this.thread) { if (uploading >= this.thread || uploading && this.mode == 'html4') {
break; break;
} }
if (!file.active && !file.error && !file.success) { if (!file.active && !file.error && !file.success) {

File diff suppressed because one or more lines are too long

@ -1583,8 +1583,6 @@ return /******/ (function(modules) { // webpackBootstrap
document.body.removeEventListener('keydown', onKeydown); document.body.removeEventListener('keydown', onKeydown);
iframe.parentNode && iframe.parentNode.removeChild(iframe);
if (!(file = self.get(file))) { if (!(file = self.get(file))) {
return reject(new Error('not_exists')); return reject(new Error('not_exists'));
} }
@ -1644,6 +1642,12 @@ return /******/ (function(modules) { // webpackBootstrap
form.submit(); form.submit();
}, 10); }, 10);
}).then(function (res) {
iframe.parentNode && iframe.parentNode.removeChild(iframe);
return res;
}).catch(function (res) {
iframe.parentNode && iframe.parentNode.removeChild(iframe);
return res;
}); });
}, },
watchActive: function watchActive(active) { watchActive: function watchActive(active) {
@ -1653,7 +1657,7 @@ return /******/ (function(modules) { // webpackBootstrap
while (file = this.files[index]) { while (file = this.files[index]) {
index++; index++;
if (active && !this.destroy) { if (active && !this.destroy) {
if (uploading >= this.thread) { if (uploading >= this.thread || uploading && this.mode == 'html4') {
break; break;
} }
if (!file.active && !file.error && !file.success) { if (!file.active && !file.error && !file.success) {

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

@ -265,7 +265,7 @@ export default {
// this.beforeSend(newFile) // this.beforeSend(newFile)
// min size // min size
if (newFile.size < 100 * 1024) { if (newFile.size >= 0 && newFile.size < 100 * 1024) {
newFile = this.$refs.upload.update(newFile, {error: 'size'}) newFile = this.$refs.upload.update(newFile, {error: 'size'})
} }
} }

@ -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.4.0-beta.9", "version": "2.4.0-beta.10",
"author": "LianYue", "author": "LianYue",
"scripts": { "scripts": {
"dev": "webpack-dev-server --inline --hot", "dev": "webpack-dev-server --inline --hot",

@ -773,9 +773,6 @@ export default {
// esc // esc
document.body.removeEventListener('keydown', onKeydown) document.body.removeEventListener('keydown', onKeydown)
//
iframe.parentNode && iframe.parentNode.removeChild(iframe)
// //
if (!(file = self.get(file))) { if (!(file = self.get(file))) {
return reject(new Error('not_exists')) return reject(new Error('not_exists'))
@ -849,6 +846,12 @@ export default {
}, 10) }, 10)
}).then(function(res) {
iframe.parentNode && iframe.parentNode.removeChild(iframe)
return res
}).catch(function(res) {
iframe.parentNode && iframe.parentNode.removeChild(iframe)
return res
}) })
}, },
@ -861,7 +864,7 @@ export default {
while (file = this.files[index]) { while (file = this.files[index]) {
index++ index++
if (active && !this.destroy) { if (active && !this.destroy) {
if (uploading >= this.thread) { if (uploading >= this.thread || (uploading && this.mode == 'html4')) {
break break
} }
if (!file.active && !file.error && !file.success) { if (!file.active && !file.error && !file.success) {

Loading…
Cancel
Save