Unverified Commit 18d1f6a6 authored by Joel's avatar Joel Committed by GitHub

fix: chat res table or code is very long caused ui problem (#124)

parent 1b6e3ef9
...@@ -291,6 +291,7 @@ const Answer: FC<IAnswerProps> = ({ item, feedbackDisabled = false, isHideFeedba ...@@ -291,6 +291,7 @@ const Answer: FC<IAnswerProps> = ({ item, feedbackDisabled = false, isHideFeedba
</div> </div>
} }
</div> </div>
<div className={s.answerWrapWrap}>
<div className={`${s.answerWrap} ${showEdit ? 'w-full' : ''}`}> <div className={`${s.answerWrap} ${showEdit ? 'w-full' : ''}`}>
<div className={`${s.answer} relative text-sm text-gray-900`}> <div className={`${s.answer} relative text-sm text-gray-900`}>
<div className={'ml-2 py-3 px-4 bg-gray-100 rounded-tr-2xl rounded-b-2xl'}> <div className={'ml-2 py-3 px-4 bg-gray-100 rounded-tr-2xl rounded-b-2xl'}>
...@@ -362,6 +363,7 @@ const Answer: FC<IAnswerProps> = ({ item, feedbackDisabled = false, isHideFeedba ...@@ -362,6 +363,7 @@ const Answer: FC<IAnswerProps> = ({ item, feedbackDisabled = false, isHideFeedba
</div> </div>
</div> </div>
</div> </div>
</div>
) )
} }
...@@ -372,7 +374,7 @@ const Question: FC<IQuestionProps> = ({ id, content, more, useCurrentUserAvatar ...@@ -372,7 +374,7 @@ const Question: FC<IQuestionProps> = ({ id, content, more, useCurrentUserAvatar
const userName = userProfile?.name const userName = userProfile?.name
return ( return (
<div className='flex items-start justify-end' key={id}> <div className='flex items-start justify-end' key={id}>
<div> <div className={s.questionWrapWrap}>
<div className={`${s.question} relative text-sm text-gray-900`}> <div className={`${s.question} relative text-sm text-gray-900`}>
<div <div
className={'mr-2 py-3 px-4 bg-blue-500 rounded-tl-2xl rounded-b-2xl'} className={'mr-2 py-3 px-4 bg-blue-500 rounded-tl-2xl rounded-b-2xl'}
......
...@@ -42,6 +42,23 @@ ...@@ -42,6 +42,23 @@
display: none; display: none;
} }
.answerWrapWrap,
.questionWrapWrap {
width: 0;
flex-grow: 1;
}
.questionWrapWrap {
display: flex;
justify-content: flex-end;
}
.answerWrap,
.question {
display: inline-block;
max-width: 100%;
}
.answerWrap:hover .copyBtn { .answerWrap:hover .copyBtn {
display: block; display: block;
} }
......
...@@ -594,6 +594,7 @@ ...@@ -594,6 +594,7 @@
.markdown-body table th { .markdown-body table th {
font-weight: var(--base-text-weight-semibold, 600); font-weight: var(--base-text-weight-semibold, 600);
white-space: nowrap;
} }
.markdown-body table th, .markdown-body table th,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment