提交 86547232 编写于 作者: chengxiang.li's avatar chengxiang.li

update

上级 b58b5e0b
...@@ -174,10 +174,15 @@ ...@@ -174,10 +174,15 @@
}); });
}, },
getImgParam(file) { getImgParam(file) {
const isLt2M = file.size / 1024 / 1024 < 5; let isAllowed = /^image\/(jpg|jpeg|png|bmp)$/.test(file.type);
if( !isAllowed ){
this.$message.error('仅支持jpg、png、bmp格式图片文件');
return false;
}
const isLt2M = (file.size / 1024 / 1024) < 5;
if (!isLt2M) { if (!isLt2M) {
this.$message.error('上传图片大小不能超过 5MB!'); this.$message.error('上传图片大小不能超过 5MB!');
return isLt2M; return false;
} }
const date = new Date(); const date = new Date();
const year = date.getFullYear(); const year = date.getFullYear();
...@@ -238,15 +243,23 @@ ...@@ -238,15 +243,23 @@
margin-left: 10px; margin-left: 10px;
} }
.el-upload-list--picture .el-upload-list__item-thumbnail{ .el-upload-list--picture .el-upload-list__item-thumbnail{
margin-left: -74px; margin-left: -75px;
} }
.el-upload-list__item{ .el-upload-list__item{
width: 92px; width: 92px;
height: 102px !important;
padding-top: 15px !important;
display: inline-block; display: inline-block;
margin-right: 5px; margin-right: 5px;
.el-upload-list__item-name{ .el-upload-list__item-name{
display: none; display: none;
} }
.el-icon-close-tip{
display: none;
}
&.is-success:focus:not(:hover) .el-icon-close-tip {
display: none;
}
} }
.el-upload-list--picture .el-upload-list__item-status-label{ .el-upload-list--picture .el-upload-list__item-status-label{
background: #449284; background: #449284;
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册