上传文件的大小改为200MB,图片改为10MB,视频改为 20MB,忘记密码和注册多个提示问题解决

This commit is contained in:
王兴凯 2026-05-06 09:32:08 +08:00
parent 5743077bdd
commit 3b0eef5bbb
5 changed files with 9 additions and 10 deletions

View File

@ -313,7 +313,7 @@ const forgotPasswordRules = ref({
} }
], ],
confirmPassword: [ confirmPassword: [
{ required: true, message: "请再次输入密码", trigger: "blur" }, // { required: true, message: "", trigger: "blur" },
{ {
validator: (rule: any, value: string) => { validator: (rule: any, value: string) => {
if (!value) { if (!value) {

View File

@ -237,7 +237,6 @@ const registerRules = {
// //
password: [ password: [
{ required: true, message: "请输入密码", trigger: "blur" },
{ {
validator: (rule: any, value: string) => { validator: (rule: any, value: string) => {
if (!value) { if (!value) {

View File

@ -530,9 +530,9 @@ const beforeImageUpload: UploadProps["beforeUpload"] = (file) => {
message.error("只能上传 JPG/PNG/JPEG 格式的图片!"); message.error("只能上传 JPG/PNG/JPEG 格式的图片!");
return Upload.LIST_IGNORE; return Upload.LIST_IGNORE;
} }
const isLt2M = file.size / 1024 / 1024 < 5; // 5M const isLt2M = file.size / 1024 / 1024 < 10; // 10M
if (!isLt2M) { if (!isLt2M) {
message.error("图片大小不能超过 5MB!"); message.error("图片大小不能超过 10MB!");
return Upload.LIST_IGNORE; return Upload.LIST_IGNORE;
} }
// false // false
@ -546,9 +546,9 @@ const beforeVideoUpload: UploadProps["beforeUpload"] = (file) => {
message.error("只能上传 MP4 格式的视频!"); message.error("只能上传 MP4 格式的视频!");
return Upload.LIST_IGNORE; return Upload.LIST_IGNORE;
} }
const isLt50M = file.size / 1024 / 1024 < 10; // 50M const isLt50M = file.size / 1024 / 1024 < 20; // 20M
if (!isLt50M) { if (!isLt50M) {
message.error("视频大小不能超过 10MB!"); message.error("视频大小不能超过 20MB!");
return Upload.LIST_IGNORE; return Upload.LIST_IGNORE;
} }
// false // false

View File

@ -57,7 +57,7 @@
</a-tooltip> </a-tooltip>
<a-tooltip placement="left"> <a-tooltip placement="left">
<template #title> <template #title>
<div>导入须知仅支持 ZIP 压缩包上传压缩包内需包含 imagesvideo 文件夹根目录需放置 xlsx 格式表格单包大小请勿超过 10MBExcel 单次最大支持 10000 行数据超出请分批导入具体请参考下载模版格式</div> <div>导入须知仅支持 ZIP 压缩包上传压缩包内需包含 imagesvideo 文件夹根目录需放置 xlsx 格式表格单包大小请勿超过 300MBExcel 单次最大支持 10000 行数据超出请分批导入具体请参考下载模版格式</div>
</template> </template>
<a-button> <a-button>
<template #icon><QuestionOutlined /></template> <template #icon><QuestionOutlined /></template>

View File

@ -778,10 +778,10 @@ const handleFileSelect = (e: Event) => {
const file = target.files?.[0]; const file = target.files?.[0];
if (!file) return; if (!file) return;
// (50MB) // (300MB)
const maxSize = 50 * 1024 * 1024; const maxSize = 300 * 1024 * 1024;
if (file.size > maxSize) { if (file.size > maxSize) {
message.error("文件大小不能超过50MB"); message.error("文件大小不能超过300MB");
resetFileInput(); resetFileInput();
return; return;
} }