|
@@ -81,13 +81,13 @@ function handlePageChange(page){
|
|
function handleUploadImg(file){
|
|
function handleUploadImg(file){
|
|
//图片大小和格式限制
|
|
//图片大小和格式限制
|
|
const {size,type} = file.file
|
|
const {size,type} = file.file
|
|
- const sizeLimit = 500*1024
|
|
|
|
|
|
+ const sizeLimit = 5*1024*1024
|
|
if(!['image/png','image/jpeg'].includes(type)){
|
|
if(!['image/png','image/jpeg'].includes(type)){
|
|
ElMessage.warning('仅支持png、jpg格式的图片')
|
|
ElMessage.warning('仅支持png、jpg格式的图片')
|
|
return
|
|
return
|
|
}
|
|
}
|
|
if(size>sizeLimit){
|
|
if(size>sizeLimit){
|
|
- ElMessage.warning('资源库图片不能超过500kb')
|
|
|
|
|
|
+ ElMessage.warning('资源库图片不能超过5M')
|
|
return
|
|
return
|
|
}
|
|
}
|
|
let form = new FormData();
|
|
let form = new FormData();
|