fix(chat): improve text bubble layout to fill width and prevent overflow
This commit is contained in:
@@ -29,9 +29,12 @@ export function MessageContent({ content, imageUrl, isFromAI }: MessageContentPr
|
||||
style={{
|
||||
display: "flex",
|
||||
flexDirection: "column",
|
||||
// **关键**:在 row flex 父中撑开(不依赖 content 循环)—— 让 TextBubble 能拿到真实宽度
|
||||
flex: "1 1 0",
|
||||
// 防超长 content(图片 / 超长 url)撑爆父
|
||||
minWidth: 0,
|
||||
alignItems: isFromAI ? "flex-start" : "flex-end",
|
||||
gap: 8,
|
||||
maxWidth: "100%",
|
||||
}}
|
||||
>
|
||||
{hasImage && imageUrl && <ImageBubble imageUrl={imageUrl} />}
|
||||
|
||||
Reference in New Issue
Block a user