We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7b1a0f6 commit 1b93bfbCopy full SHA for 1b93bfb
client/packages/design/components/Avatar/index.tsx
@@ -47,8 +47,12 @@ const _Avatar: React.FC<AvatarProps> = React.memo((_props) => {
47
48
if (_isNumber(props.size)) {
49
// 为了支持rem统一管理宽度,将size转换为样式宽度(size类型上不支持rem单位)
50
- style.width = px2rem(props.size);
51
- style.height = px2rem(props.size);
+ if (!style.width) {
+ style.width = px2rem(props.size);
52
+ }
53
+ if (!style.height) {
54
+ style.height = px2rem(props.size);
55
56
57
if (typeof style.fontSize === 'undefined') {
58
// 如果props.size是数字且没有指定文字大小
0 commit comments