🐛(component): 修复 upload 组件 size 属性文件大小限制提示信息单位换算错误

This commit is contained in:
就眠儀式 2022-10-07 15:46:42 +08:00
parent 9e426b982e
commit 0ca86f1fc6
2 changed files with 6 additions and 3 deletions

View File

@ -100,7 +100,6 @@ class Tree {
const nodeChildren = Reflect.get(origin, children);
const nodeDisabled = !!Reflect.get(origin, "disabled");
const nodeIsLeaf = !!Reflect.get(origin, "spread");
const parentNode = nodeMap.get(parentKey);
const node = Object.assign({}, origin, {
@ -182,7 +181,11 @@ class Tree {
}
}
setCheckedKeys(checked: boolean, checkStrictly: boolean | string, node: TreeData) {
setCheckedKeys(
checked: boolean,
checkStrictly: boolean | string,
node: TreeData
) {
node.isChecked = checked;
if (!checkStrictly) {
if (node.parentNode) {

View File

@ -300,7 +300,7 @@ const getUploadChange = (e: any) => {
let _sizeErrorFile = _cache[i];
let errorMsg = `文件 ${
_sizeErrorFile.name
} ${sizeErrorMsg},文件最大不可超过${props.size * 1000}kb`;
} ${sizeErrorMsg},文件最大不可超过${props.size}kb`;
errorF(errorMsg);
return;
}