Skip to content

Commit

Permalink
优化volupload上传第三方路径判断
Browse files Browse the repository at this point in the history
  • Loading branch information
cq-panda committed Apr 19, 2024
1 parent 5a28be6 commit 6a393e3
Show file tree
Hide file tree
Showing 2 changed files with 110 additions and 88 deletions.
29 changes: 20 additions & 9 deletions Vol.Vue3.Vite/src/components/basic/VolUpload.vue
Original file line number Diff line number Diff line change
Expand Up @@ -558,15 +558,26 @@ export default {
// if (!this.multiple) {
this.fileInfo.splice(0);
// }
let _files = this.files.map((file) => {
if (file.path) {
return file;
}
return {
name: file.name,
path: file.path || x.data + file.name
};
});
let _files;
if (this.multiple && this.base.isUrl(x.data.split(',')[0])) {
_files = this.files.filter((file) => { return file.path });
_files.push(...x.data.split(',').map(x => {
return {
name: x.split('/').pop(),
path: x
}
}))
} else {
_files = this.files.map((file) => {
if (file.path) {
return file;
}
return {
name: file.name,
path: file.path || (this.base.isUrl(x.data) ? x.data : (x.data + file.name))
};
});
}
this.fileInfo.push(..._files);
//2021.09.25修复文件上传后不能同时下载的问题
this.files = _files;
Expand Down
Loading

0 comments on commit 6a393e3

Please sign in to comment.