fix: bug#10561
This commit is contained in:
parent
48b6bbc0a7
commit
c08f29d4da
|
@ -12,10 +12,14 @@
|
||||||
</j-empty>
|
</j-empty>
|
||||||
<template v-else>
|
<template v-else>
|
||||||
<j-tabs v-model:activeKey="activeKey">
|
<j-tabs v-model:activeKey="activeKey">
|
||||||
<j-tab-pane key="Simple" tab="精简模式" />
|
<j-tab-pane key="Simple" tab="精简模式">
|
||||||
<j-tab-pane key="Advance" tab="高级模式" />
|
<Simple />
|
||||||
|
</j-tab-pane>
|
||||||
|
<j-tab-pane key="Advance" tab="高级模式">
|
||||||
|
<Advance />
|
||||||
|
</j-tab-pane>
|
||||||
</j-tabs>
|
</j-tabs>
|
||||||
<component :is="tabs[activeKey]" />
|
<!-- <component :is="tabs[activeKey]" /> -->
|
||||||
</template>
|
</template>
|
||||||
</j-card>
|
</j-card>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -406,13 +406,16 @@ const uploader: uploaderType = {
|
||||||
'image/pjp',
|
'image/pjp',
|
||||||
'image/pjpeg',
|
'image/pjpeg',
|
||||||
],
|
],
|
||||||
|
// imageTypes: ['.jpg','.png','.jfif','.pjp','.pjpeg','.jpeg'],
|
||||||
iconTypes: ['image/x-icon'],
|
iconTypes: ['image/x-icon'],
|
||||||
// logo格式校验
|
// logo格式校验
|
||||||
beforeLogoUpload: ({ size, type }: File) => {
|
// beforeLogoUpload: ({ size, type }: File) => {
|
||||||
|
beforeLogoUpload: (file: File) => {
|
||||||
|
console.log('file: ', file);
|
||||||
const typeBool =
|
const typeBool =
|
||||||
uploader.imageTypes.filter((typeStr) => type.includes(typeStr))
|
uploader.imageTypes.filter((typeStr) => file.type.includes(typeStr))
|
||||||
.length > 0;
|
.length > 0;
|
||||||
const sizeBool = size / 1024 / 1024 < 4;
|
const sizeBool = file.size / 1024 / 1024 < 4;
|
||||||
if (!typeBool) {
|
if (!typeBool) {
|
||||||
message.error(`请上传.jpg.png.jfif.pjp.pjpeg.jpeg格式的图片`);
|
message.error(`请上传.jpg.png.jfif.pjp.pjpeg.jpeg格式的图片`);
|
||||||
} else if (!sizeBool) {
|
} else if (!sizeBool) {
|
||||||
|
|
Loading…
Reference in New Issue