Skip to content

Commit 5513c0f

Browse files
authored
fix(attachments): 修复附件icon在不同机型的显示(#4121) (#4124)
1 parent cefe532 commit 5513c0f

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

packages/pro-components/chat/attachments/attachments.less

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
@attachments-background-color: @bg-color-secondarycontainer;
66
@attachments-file-margin: 16rpx;
7-
@attachments-file-margin-tiny: 8rpx;
7+
@attachments-file-margin-tiny: 10rpx;
88
@attachments-file-padding: 24rpx;
99
@attachments-file-image-size: 104rpx;
1010
@attachments-file-width: 256rpx;
@@ -92,10 +92,12 @@
9292
display: block;
9393
position: relative;
9494
background-color: @attachments-background-color;
95+
overflow: visible; // 允许删除按钮溢出显示
9596

96-
// 仅当有删除按钮时,增加上边距
97+
// 仅当有删除按钮时,增加上边距和右边距以留出删除按钮空间
9798
&--removable {
98-
margin-top: @attachments-file-margin-tiny;
99+
margin-top: 12rpx;
100+
margin-right: 8rpx;
99101
}
100102

101103
// 删除按钮样式
@@ -104,8 +106,8 @@
104106
color: @bg-color-container;
105107
border-radius: @radius-circle;
106108
position: absolute;
107-
right: -4px;
108-
top: -4px;
109+
right: -8rpx;
110+
top: -8rpx;
109111
}
110112

111113
// 图片文件样式 适配图片附件在聊天中的特殊样式
@@ -183,7 +185,6 @@
183185

184186
// 对话中附件样式覆盖
185187
.@{attachments}--chatting {
186-
187188
&.all_images {
188189
width: 100%;
189190

0 commit comments

Comments
 (0)