Selaa lähdekoodia

fix: [Chat] Modify the problem that the picture will be deformed when the picture ratio is not 1:1 (#2496)

YyumeiZhang 1 vuosi sitten
vanhempi
sitoutus
f182880c12

+ 4 - 0
packages/semi-foundation/chat/chat.scss

@@ -474,6 +474,10 @@ $module: #{$prefix}-chat;
         &-img {
             border-radius: $radius-chat_attachment_img;
             vertical-align: top;
+
+            img {
+                object-fit: cover;
+            }
         }
 
         a {

+ 1 - 1
packages/semi-ui/chat/_story/constant.js

@@ -69,7 +69,7 @@ const infoWithAttachment = [
             {
                 type: 'image_url',
                 image_url: {
-                    url: 'https://lf3-static.bytednsdoc.com/obj/eden-cn/ptlz_zlp/ljhwZthlaukjlkulzlp/root-web-sites/edit-bag.jpeg',
+                    url: 'https://lf3-static.bytednsdoc.com/obj/eden-cn/ptlz_zlp/ljhwZthlaukjlkulzlp/other/avatar-vertical.jpeg',
                 },
             },
             {