提交代码
This commit is contained in:
parent
87575df13e
commit
828b3bf24e
|
|
@ -76,7 +76,6 @@ export default {
|
||||||
queue: [], // 文件上传队列
|
queue: [], // 文件上传队列
|
||||||
maxConcurrentUploads: 5, // 最大并发上传数
|
maxConcurrentUploads: 5, // 最大并发上传数
|
||||||
uploadsNum:{},
|
uploadsNum:{},
|
||||||
isUploading: true, // 是否正在上传
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
beforeMount() {
|
beforeMount() {
|
||||||
|
|
@ -106,7 +105,6 @@ export default {
|
||||||
this.uploadFailed = {};
|
this.uploadFailed = {};
|
||||||
this.queue = [];
|
this.queue = [];
|
||||||
this.uploadsNum = {};
|
this.uploadsNum = {};
|
||||||
this.isUploading = true; // 允许重新上传
|
|
||||||
},
|
},
|
||||||
// 自定义上传请求
|
// 自定义上传请求
|
||||||
customUpload(uploadFile) {
|
customUpload(uploadFile) {
|
||||||
|
|
@ -179,7 +177,7 @@ export default {
|
||||||
},
|
},
|
||||||
// 启动队列中的下一个文件上传(控制并发)
|
// 启动队列中的下一个文件上传(控制并发)
|
||||||
startNextUpload() {
|
startNextUpload() {
|
||||||
if (!this.isUploading) return; // 如果停止上传,则不启动新任务
|
if (!this.drawer) return; // 如果停止上传,则不启动新任务
|
||||||
|
|
||||||
Object.keys(this.uploadsNum).forEach((fileName) => {
|
Object.keys(this.uploadsNum).forEach((fileName) => {
|
||||||
if (this.uploadsNum[fileName] === 100) {
|
if (this.uploadsNum[fileName] === 100) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue