fix: 🧩 修复富文本编辑器视频上传限制(150M)

This commit is contained in:
2025-08-26 17:27:49 +08:00
parent 29d6ba59c9
commit 0dab4cc524
8 changed files with 37 additions and 21 deletions

View File

@@ -177,7 +177,7 @@ const currentEditingTabsRef = ref(null);
const props = defineProps({
content: { type: String, default: "" },
readOnly: { type: Boolean, default: false },
fileSizeLimit: { type: Number, default: 10 }
fileSizeLimit: { type: Number, default: 5 }
});
// 主编辑器内容双向绑定
@@ -456,13 +456,14 @@ const handleVideoUpload = async evt => {
const file = evt.target.files[0];
// 1. 校验视频文件
const maxSize = props.fileSizeLimit * 1024 * 1024 * 15;
const maxSize = 150 * 1024 * 1024;
if (file.size > maxSize) {
ElNotification({
title: "文件过大",
message: `视频大小不能超过 ${props.fileSizeLimit}MB`,
message: `视频大小不能超过 ${150}MB`,
type: "warning"
});
evt.target.value = "";
return;
}