Skip to content

Commit 0966a85

Browse files
muronggjuzi214032
authored andcommitted
fix(Avatar): 修复使用 Icon 属性时容器宽高不正确问题
当 text 属性存在,使用 Icon 展示,且 placement 为 top 或 bottom 时,宽高显示不正确(自定义图片时不会出现) close #1043
1 parent 1f5e5cf commit 0966a85

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/avatar/index.wxml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

22
<view class="l-avatar {{text||_isHaveUserNickName?'l-placement-'+placement:''}}" mut-bind:tap="tapAvatar">
3-
<view class="l-avatar-image {{shape?'l-'+shape:''}} l-class" wx:if="{{_isHaveUserAvatarUrl||icon||src}}" style="width:{{size}}rpx;height:{{size}}rpx">
3+
<view class="l-avatar-image {{shape?'l-'+shape:''}} l-class" wx:if="{{_isHaveUserAvatarUrl||icon||src}}" style="width:{{size}}rpx;height:{{size}}rpx;min-width:{{size}}rpx;min-height:{{size}}rpx;">
44
<open-data class="open-data" wx:if="{{_isHaveUserAvatarUrl}}" type="userAvatarUrl" />
55
<l-icon wx:elif="{{icon}}" size="{{iconSize || size*0.6}}" color="{{iconColor||'#ffffff'}}" name="{{icon}}" />
66
<image wx:elif="{{src}}" src="{{src}}" mode="{{mode}}" style="width:{{size}}rpx;height:{{size}}rpx" />

0 commit comments

Comments
 (0)