2 Commits
1.5.3 ... main

Author SHA1 Message Date
dap
0a83a9adf9 fix(upload): 修复文件大小校验失败后仍被加入列表的问题
通过返回 Upload.LIST_IGNORE 替代 false,防止不符合大小限制的文件被加入上传文件列表,解决 Safari 浏览器兼容性问题。
2026-02-03 19:21:09 +08:00
dap
c139228d9b chore: 锁定版本 vxe打包丢失css 2026-02-03 14:36:43 +08:00
2 changed files with 4 additions and 3 deletions

View File

@@ -22,7 +22,7 @@ import { computed, onUnmounted, ref, watch } from 'vue';
import { $t } from '@vben/locales';
import { message, Modal } from 'ant-design-vue';
import { message, Modal, Upload } from 'ant-design-vue';
import { isFunction, isString } from 'lodash-es';
import { ossInfo } from '#/api/system/oss';
@@ -271,7 +271,8 @@ export function useUpload(
const isLtMax = file.size / 1024 / 1024 < props.maxSize!;
if (!isLtMax) {
message.error($t('component.upload.maxSize', [props.maxSize]));
return false;
// 防止被加入文件列表 可以通过返回 Upload.LIST_IGNORE 实现。
return Upload.LIST_IGNORE;
}
// 大坑 Safari不支持file-type库 去除文件类型的校验
return file;

View File

@@ -199,7 +199,7 @@ catalog:
vue-tippy: ^6.7.1
vue-tsc: ^3.2.4
vue3-colorpicker: ^2.3.0
vxe-pc-ui: ^4.12.16
vxe-pc-ui: 4.12.16
vxe-table: ^4.17.46
watermark-js-plus: ^1.6.3
yaml-eslint-parser: ^1.3.2