fix: 背景图片上传必须小于10MB
This commit is contained in:
@@ -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"
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
/**上传变更 */
|
||||
|
||||
Reference in New Issue
Block a user