Skip to content

Commit

Permalink
feat(a-upload): 更新上传图片高度以支持 antd 5
Browse files Browse the repository at this point in the history
  • Loading branch information
twinh committed Jun 13, 2024
1 parent 8aecf45 commit b55d134
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class Upload extends Component {
/**
* 指定上传区域的大小
*/
size: 104,
size: 110,

/**
* 提交时如果没有图片,是否转换值为 `undefined`(即不提交给后台)
Expand Down Expand Up @@ -190,14 +190,6 @@ class Upload extends Component {
/* 上传单张图片时,不因隐藏上传图标而抖动页面 */
min-height: ${size}px;
min-width: ${size}px;
line-height: 0; /* 移除空白 */
}
.ant-upload-container-${id} .ant-upload-list-picture-card-container,
.ant-upload-container-${id} .ant-upload-list-picture-card .ant-upload-list-item,
.ant-upload-container-${id} .ant-upload.ant-upload-select-picture-card {
width: ${size}px;
height: ${size}px;
${max === 1 ? 'margin: 0;' : ''}
}
`}
</style>
Expand Down

0 comments on commit b55d134

Please sign in to comment.