Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Hooke
/
data-table
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Graphs
Network
Create a new issue
Commits
Issue Boards
Authored by
hookehuyr
2022-12-05 16:15:34 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
76904c974afa1b92248d6870ea0f12e30b16cc93
76904c97
1 parent
95000ed4
fix 文件上传控件错误提示优化
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
src/components/FileUploaderField/index.vue
src/components/FileUploaderField/index.vue
View file @
76904c9
...
...
@@ -67,7 +67,7 @@
* @param file_type[Array] 文件上传类型
* @param multiple[Boolean] 文件多选
*/
import { showSuccessToast, showFailToast } from "vant";
import { showSuccessToast, showFailToast
, showToast
} from "vant";
import _ from "lodash";
import { v4 as uuidv4 } from "uuid";
import { qiniuTokenAPI, qiniuUploadAPI, saveFileAPI } from "@/api/common";
...
...
@@ -107,12 +107,12 @@ const beforeRead = (file) => {
if (fileList.value.length + 1 > props.item.component_props.max_count) {
// 数量限制
flag = false;
show
FailToast(`最大上传数量为${props.item.component_props.max_count}
`);
show
Toast(`最大上传数量为${props.item.component_props.max_count}个
`);
}
if (file.size > props.item.component_props.max_size) {
// 体积限制
flag = false;
show
Fail
Toast(
showToast(
`最大文件体积为${(props.item.component_props.max_size / 1024 / 1024).toFixed(2)}MB`
);
}
...
...
Please
register
or
login
to post a comment