mirror of
https://gitee.com/dapppp/ruoyi-plus-vben5.git
synced 2026-04-08 05:33:14 +08:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0a83a9adf9 | ||
|
|
c139228d9b |
@@ -22,7 +22,7 @@ import { computed, onUnmounted, ref, watch } from 'vue';
|
|||||||
|
|
||||||
import { $t } from '@vben/locales';
|
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 { isFunction, isString } from 'lodash-es';
|
||||||
|
|
||||||
import { ossInfo } from '#/api/system/oss';
|
import { ossInfo } from '#/api/system/oss';
|
||||||
@@ -271,7 +271,8 @@ export function useUpload(
|
|||||||
const isLtMax = file.size / 1024 / 1024 < props.maxSize!;
|
const isLtMax = file.size / 1024 / 1024 < props.maxSize!;
|
||||||
if (!isLtMax) {
|
if (!isLtMax) {
|
||||||
message.error($t('component.upload.maxSize', [props.maxSize]));
|
message.error($t('component.upload.maxSize', [props.maxSize]));
|
||||||
return false;
|
// 防止被加入文件列表 可以通过返回 Upload.LIST_IGNORE 实现。
|
||||||
|
return Upload.LIST_IGNORE;
|
||||||
}
|
}
|
||||||
// 大坑 Safari不支持file-type库 去除文件类型的校验
|
// 大坑 Safari不支持file-type库 去除文件类型的校验
|
||||||
return file;
|
return file;
|
||||||
|
|||||||
@@ -199,7 +199,7 @@ catalog:
|
|||||||
vue-tippy: ^6.7.1
|
vue-tippy: ^6.7.1
|
||||||
vue-tsc: ^3.2.4
|
vue-tsc: ^3.2.4
|
||||||
vue3-colorpicker: ^2.3.0
|
vue3-colorpicker: ^2.3.0
|
||||||
vxe-pc-ui: ^4.12.16
|
vxe-pc-ui: 4.12.16
|
||||||
vxe-table: ^4.17.46
|
vxe-table: ^4.17.46
|
||||||
watermark-js-plus: ^1.6.3
|
watermark-js-plus: ^1.6.3
|
||||||
yaml-eslint-parser: ^1.3.2
|
yaml-eslint-parser: ^1.3.2
|
||||||
|
|||||||
Reference in New Issue
Block a user