上传文件的大小改为200MB,图片改为10MB,视频改为 20MB,忘记密码和注册多个提示问题解决
This commit is contained in:
parent
5743077bdd
commit
3b0eef5bbb
@ -313,7 +313,7 @@ const forgotPasswordRules = ref({
|
||||
}
|
||||
],
|
||||
confirmPassword: [
|
||||
{ required: true, message: "请再次输入密码", trigger: "blur" },
|
||||
// { required: true, message: "请再次输入密码", trigger: "blur" },
|
||||
{
|
||||
validator: (rule: any, value: string) => {
|
||||
if (!value) {
|
||||
|
||||
@ -237,7 +237,6 @@ const registerRules = {
|
||||
|
||||
// 密码
|
||||
password: [
|
||||
{ required: true, message: "请输入密码", trigger: "blur" },
|
||||
{
|
||||
validator: (rule: any, value: string) => {
|
||||
if (!value) {
|
||||
|
||||
@ -530,9 +530,9 @@ const beforeImageUpload: UploadProps["beforeUpload"] = (file) => {
|
||||
message.error("只能上传 JPG/PNG/JPEG 格式的图片!");
|
||||
return Upload.LIST_IGNORE;
|
||||
}
|
||||
const isLt2M = file.size / 1024 / 1024 < 5; // 限制5M,可根据需求调整
|
||||
const isLt2M = file.size / 1024 / 1024 < 10; // 限制10M,可根据需求调整
|
||||
if (!isLt2M) {
|
||||
message.error("图片大小不能超过 5MB!");
|
||||
message.error("图片大小不能超过 10MB!");
|
||||
return Upload.LIST_IGNORE;
|
||||
}
|
||||
// 返回 false 阻止自动上传,我们手动处理
|
||||
@ -546,9 +546,9 @@ const beforeVideoUpload: UploadProps["beforeUpload"] = (file) => {
|
||||
message.error("只能上传 MP4 格式的视频!");
|
||||
return Upload.LIST_IGNORE;
|
||||
}
|
||||
const isLt50M = file.size / 1024 / 1024 < 10; // 限制50M,可根据需求调整
|
||||
const isLt50M = file.size / 1024 / 1024 < 20; // 限制20M,可根据需求调整
|
||||
if (!isLt50M) {
|
||||
message.error("视频大小不能超过 10MB!");
|
||||
message.error("视频大小不能超过 20MB!");
|
||||
return Upload.LIST_IGNORE;
|
||||
}
|
||||
// 返回 false 阻止自动上传
|
||||
|
||||
@ -57,7 +57,7 @@
|
||||
</a-tooltip>
|
||||
<a-tooltip placement="left">
|
||||
<template #title>
|
||||
<div>导入须知:仅支持 ZIP 压缩包上传,压缩包内需包含 images、video 文件夹,根目录需放置 xlsx 格式表格,单包大小请勿超过 10MB,Excel 单次最大支持 10000 行数据,超出请分批导入,具体请参考下载模版格式。</div>
|
||||
<div>导入须知:仅支持 ZIP 压缩包上传,压缩包内需包含 images、video 文件夹,根目录需放置 xlsx 格式表格,单包大小请勿超过 300MB,Excel 单次最大支持 10000 行数据,超出请分批导入,具体请参考下载模版格式。</div>
|
||||
</template>
|
||||
<a-button>
|
||||
<template #icon><QuestionOutlined /></template>
|
||||
|
||||
@ -778,10 +778,10 @@ const handleFileSelect = (e: Event) => {
|
||||
const file = target.files?.[0];
|
||||
if (!file) return;
|
||||
|
||||
// 校验文件大小 (50MB)
|
||||
const maxSize = 50 * 1024 * 1024;
|
||||
// 校验文件大小 (300MB)
|
||||
const maxSize = 300 * 1024 * 1024;
|
||||
if (file.size > maxSize) {
|
||||
message.error("文件大小不能超过50MB");
|
||||
message.error("文件大小不能超过300MB");
|
||||
resetFileInput();
|
||||
return;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user