浏览代码

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

YyumeiZhang 1 年之前
父节点
当前提交
f182880c12
共有 2 个文件被更改,包括 5 次插入1 次删除
  1. 4 0
      packages/semi-foundation/chat/chat.scss
  2. 1 1
      packages/semi-ui/chat/_story/constant.js

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

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

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

@@ -69,7 +69,7 @@ const infoWithAttachment = [
             {
             {
                 type: 'image_url',
                 type: 'image_url',
                 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',
                 },
                 },
             },
             },
             {
             {