fix: 背景图片上传必须小于10MB
This commit is contained in:
@@ -208,7 +208,7 @@ document.addEventListener('visibilitychange', function () {
|
|||||||
</template>
|
</template>
|
||||||
<template v-if="appStore.logoType === 'brand'">
|
<template v-if="appStore.logoType === 'brand'">
|
||||||
<img
|
<img
|
||||||
:class="{ 'logo-brand': proConfig.layout !== 'side' }"
|
class="logo-brand"
|
||||||
:src="appStore.getLOGOBrand"
|
:src="appStore.getLOGOBrand"
|
||||||
:alt="appStore.appName"
|
:alt="appStore.appName"
|
||||||
:title="appStore.appName"
|
:title="appStore.appName"
|
||||||
|
|||||||
@@ -38,11 +38,11 @@ function fnBeforeUpload(file: FileType) {
|
|||||||
if (!isJpgOrPng) {
|
if (!isJpgOrPng) {
|
||||||
message.error('只支持上传图片格式(jpg、png、svg、webp)', 3);
|
message.error('只支持上传图片格式(jpg、png、svg、webp)', 3);
|
||||||
}
|
}
|
||||||
const isLt2M = file.size / 1024 / 1024 < 2;
|
const isLt10M = file.size / 1024 / 1024 < 10;
|
||||||
if (!isLt2M) {
|
if (!isLt10M) {
|
||||||
message.error('图片文件大小必须小于 2MB', 3);
|
message.error('图片文件大小必须小于 10MB', 3);
|
||||||
}
|
}
|
||||||
return isJpgOrPng && isLt2M;
|
return isJpgOrPng && isLt10M;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**上传变更 */
|
/**上传变更 */
|
||||||
|
|||||||
Reference in New Issue
Block a user