fix: 背景图片上传必须小于10MB

This commit is contained in:
TsMask
2023-11-06 18:05:31 +08:00
parent 0580fdf941
commit 4083a9bf1c
2 changed files with 5 additions and 5 deletions

View File

@@ -208,7 +208,7 @@ document.addEventListener('visibilitychange', function () {
</template>
<template v-if="appStore.logoType === 'brand'">
<img
:class="{ 'logo-brand': proConfig.layout !== 'side' }"
class="logo-brand"
:src="appStore.getLOGOBrand"
:alt="appStore.appName"
:title="appStore.appName"

View File

@@ -38,11 +38,11 @@ function fnBeforeUpload(file: FileType) {
if (!isJpgOrPng) {
message.error('只支持上传图片格式jpg、png、svg、webp', 3);
}
const isLt2M = file.size / 1024 / 1024 < 2;
if (!isLt2M) {
message.error('图片文件大小必须小于 2MB', 3);
const isLt10M = file.size / 1024 / 1024 < 10;
if (!isLt10M) {
message.error('图片文件大小必须小于 10MB', 3);
}
return isJpgOrPng && isLt2M;
return isJpgOrPng && isLt10M;
}
/**上传变更 */