Skip to content

Commit

Permalink
fix(upload): sizelimit api (#1553)
Browse files Browse the repository at this point in the history
  • Loading branch information
uyarn authored Sep 23, 2022
1 parent fb32432 commit c0b98b3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/upload/upload.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import ImageCard from './image';
import FlowList from './flow-list';
import xhr from '../_common/js/upload/xhr';
import log from '../_common/js/log';
import { formatFiles, isOverSizeLimit } from '../_common/js/upload/utils';
import { formatFiles, isOverSizeLimit1 } from '../_common/js/upload/utils';
import TButton from '../button';
import TDialog from '../dialog';
import SingleFile from './single-file';
Expand Down Expand Up @@ -516,7 +516,7 @@ export default mixins(getConfigReceiverMixins<Vue, UploadConfig>('upload'), getG

handleSizeLimit(fileSize: number) {
const sizeLimit: SizeLimitObj = typeof this.sizeLimit === 'number' ? { size: this.sizeLimit, unit: 'KB' } : this.sizeLimit;
const rSize = isOverSizeLimit(fileSize, sizeLimit.size, sizeLimit.unit);
const rSize = isOverSizeLimit1(fileSize, sizeLimit.size, sizeLimit.unit);
if (!rSize) {
// 有参数 message 则使用,没有就使用全局 global 配置
this.errorMsg = sizeLimit.message
Expand Down

0 comments on commit c0b98b3

Please sign in to comment.