Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Hooke
/
lls_program
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
hookehuyr
2025-09-12 14:10:15 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
b2b582aa0f54c75f2765908bb92885b80c08cb92
b2b582aa
1 parent
22991e72
fix(UploadMedia): 仅对图片文件进行10MB大小限制检查
视频文件不再受大小限制,仅当上传图片且超过10MB时显示错误提示
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
src/pages/UploadMedia/index.vue
src/pages/UploadMedia/index.vue
View file @
b2b582a
...
...
@@ -200,10 +200,10 @@ const chooseMedia = () => {
success: async (res) => {
const file = res.tempFiles[0];
// 检查文件大小(
10MB限制
)
if (file.size > 10 * 1024 * 1024) {
// 检查文件大小(
仅对图片进行10MB限制,视频不检查大小
)
if (file.
fileType === 'image' && file.
size > 10 * 1024 * 1024) {
Taro.showToast({
title: '
文件
大小不能超过10MB',
title: '
图片
大小不能超过10MB',
icon: 'none',
duration: 2000
});
...
...
Please
register
or
login
to post a comment