feat: 调整评论输入框的渲染顺序,确保一次只显示一个输入框

This commit is contained in:
2025-09-24 09:57:07 +08:00
parent e3e3384995
commit a744616884

View File

@ -276,7 +276,9 @@ export function CommentItem(
</div> </div>
</div> </div>
</div>
{/* 这俩输入框一次只能显示一个 */} {/* 这俩输入框一次只能显示一个 */}
</div >
{activeInput && activeInput.type === 'reply' && activeInput.id === commentState.id && <CommentInput {activeInput && activeInput.type === 'reply' && activeInput.id === commentState.id && <CommentInput
onCommentSubmitted={onReply} onCommentSubmitted={onReply}
initIsPrivate={commentState.isPrivate} initIsPrivate={commentState.isPrivate}
@ -289,9 +291,6 @@ export function CommentItem(
isUpdate={true} isUpdate={true}
initShowClientInfo={commentState.showClientInfo} initShowClientInfo={commentState.showClientInfo}
/>} />}
</div>
</div >
{showReplies && replies.length > 0 && ( {showReplies && replies.length > 0 && (
<div className="mt-4 pl-4 md:pl-8 border-l border-slate-300 dark:border-slate-600 space-y-4"> <div className="mt-4 pl-4 md:pl-8 border-l border-slate-300 dark:border-slate-600 space-y-4">
{replies.map((reply) => ( {replies.map((reply) => (