perf: 优化头像图标不超过10MB
This commit is contained in:
parent
2605d50bd0
commit
889ebe4ed5
@ -48,10 +48,10 @@ export default {
|
|||||||
upload: 'Upload',
|
upload: 'Upload',
|
||||||
default: 'Default Logo',
|
default: 'Default Logo',
|
||||||
custom: 'Custom',
|
custom: 'Custom',
|
||||||
sizeTip: 'Suggested size 32*32, supports jpg, png, gif, size no more than 10 M',
|
sizeTip: 'Suggested size 32*32, supports jpg, png, gif, size no more than 10 MB',
|
||||||
cancel: 'Cancel',
|
cancel: 'Cancel',
|
||||||
save: 'Save',
|
save: 'Save',
|
||||||
fileSizeExceeded: 'File size exceeds 10 M',
|
fileSizeExceeded: 'File size exceeds 10 MB',
|
||||||
setSuccess: 'Setting Successful',
|
setSuccess: 'Setting Successful',
|
||||||
uploadImagePrompt: 'Please upload an image'
|
uploadImagePrompt: 'Please upload an image'
|
||||||
},
|
},
|
||||||
|
|||||||
@ -47,10 +47,10 @@ export default {
|
|||||||
upload: '上传',
|
upload: '上传',
|
||||||
default: '默认logo',
|
default: '默认logo',
|
||||||
custom: '自定义',
|
custom: '自定义',
|
||||||
sizeTip: '建议尺寸 32*32,支持 JPG、PNG, GIF,大小不超过 10 M',
|
sizeTip: '建议尺寸 32*32,支持 JPG、PNG, GIF,大小不超过 10 MB',
|
||||||
cancel: '取消',
|
cancel: '取消',
|
||||||
save: '保存',
|
save: '保存',
|
||||||
fileSizeExceeded: '文件大小超过 10 M',
|
fileSizeExceeded: '文件大小超过 10 MB',
|
||||||
setSuccess: '设置成功',
|
setSuccess: '设置成功',
|
||||||
uploadImagePrompt: '请上传一张图片'
|
uploadImagePrompt: '请上传一张图片'
|
||||||
},
|
},
|
||||||
|
|||||||
@ -47,7 +47,7 @@
|
|||||||
}}</el-button>
|
}}</el-button>
|
||||||
<template #tip>
|
<template #tip>
|
||||||
<div class="el-upload__tip info" style="margin-top: 0">
|
<div class="el-upload__tip info" style="margin-top: 0">
|
||||||
建议尺寸 32*32,支持 JPG、PNG, GIF,大小不超过 10 M
|
建议尺寸 32*32,支持 JPG、PNG, GIF,大小不超过 10 MB
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</el-upload>
|
</el-upload>
|
||||||
@ -84,7 +84,7 @@
|
|||||||
}}</el-button>
|
}}</el-button>
|
||||||
<template #tip>
|
<template #tip>
|
||||||
<div class="el-upload__tip info" style="margin-top: 0">
|
<div class="el-upload__tip info" style="margin-top: 0">
|
||||||
建议尺寸 32*32,支持 JPG、PNG, GIF,大小不超过 10 M
|
建议尺寸 32*32,支持 JPG、PNG, GIF,大小不超过 10 MB
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</el-upload>
|
</el-upload>
|
||||||
@ -178,7 +178,7 @@ function resetForm() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const onChange = (file: any, fileList: UploadFiles, attr: string) => {
|
const onChange = (file: any, fileList: UploadFiles, attr: string) => {
|
||||||
//1、判断文件大小是否合法,文件限制不能大于 10 M
|
//1、判断文件大小是否合法,文件限制不能大于 10 MB
|
||||||
const isLimit = file?.size / 1024 / 1024 < 10
|
const isLimit = file?.size / 1024 / 1024 < 10
|
||||||
if (!isLimit) {
|
if (!isLimit) {
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
|
|||||||
@ -103,7 +103,7 @@ const open = (data: any) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const onChange = (file: any) => {
|
const onChange = (file: any) => {
|
||||||
//1、判断文件大小是否合法,文件限制不能大于 10M
|
//1、判断文件大小是否合法,文件限制不能大于10MB
|
||||||
const isLimit = file?.size / 1024 / 1024 < 10
|
const isLimit = file?.size / 1024 / 1024 < 10
|
||||||
if (!isLimit) {
|
if (!isLimit) {
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user