fix: 🧩 修复富文本编辑器视频上传限制(150M)
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user