压缩包

This commit is contained in:
lSun 2025-10-24 19:43:27 +08:00
parent 535fea46d8
commit 4157a5ca10
2 changed files with 8 additions and 10 deletions

View File

@ -97,15 +97,14 @@ export default {
const hasImage = fileList.some(f => this.isImageFile(f.name));
const hasZip = fileList.some(f => this.isCompressedFile(f.name));
//
if (isZip && (hasImage || hasZip)) {
this.$message.warning('不能同时上传图片和压缩包');
//
if (isZip && hasImage) {
this.$message.warning('不能同时上传压缩包');
return false;
}
//
if (this.isImageFile(file.name) && hasZip) {
this.$message.warning('不能同时上传图片和压缩包');
this.$message.warning('不能同时上传图片');
return false;
}

View File

@ -93,15 +93,14 @@ export default {
const hasImage = fileList.some(f => this.isImageFile(f.name));
const hasZip = fileList.some(f => this.isCompressedFile(f.name));
//
if (isZip && (hasImage || hasZip)) {
this.$message.warning('不能同时上传图片和压缩包');
//
if (isZip && hasImage) {
this.$message.warning('不能同时上传压缩包');
return false;
}
//
if (this.isImageFile(file.name) && hasZip) {
this.$message.warning('不能同时上传图片和压缩包');
this.$message.warning('不能同时上传图片');
return false;
}