This commit is contained in:
张成
2025-10-01 15:48:33 +08:00
parent ffc8995fc8
commit b5f99dbcad
2 changed files with 80 additions and 37 deletions

View File

@@ -144,7 +144,7 @@ const CommentReply = () => {
// 如果是回复评论parent_id 使用评论的 parent_id 或 id
// 如果是顶级评论parent_id 为 null则使用评论的 id 作为 parent_id
const parentId = replyTarget.parent_id || replyTarget.id;
const res = await commentService.replyComment(
parentId,
replyTarget.user_id,
@@ -344,44 +344,45 @@ const CommentReply = () => {
</ScrollView>
{/* 回复输入框 */}
{showReplyInput && replyTarget && (
<>
{/* 遮罩层 */}
<View className="reply-mask" onClick={handleCancelReply}></View>
<>
{/* 遮罩层 */}
<View
className={`reply-mask ${showReplyInput ? 'show' : ''}`}
onClick={handleCancelReply}
></View>
<View className="reply-input-container">
<View className="reply-input-wrapper">
<View className="input-row">
<Input
className="reply-input"
type="text"
placeholder={`回复 ${replyTarget.user_nickname}`}
value={replyContent}
focus={inputFocus}
adjustPosition={true}
cursorSpacing={30}
holdKeyboard={false}
onInput={(e) => setReplyContent(e.detail.value)}
onBlur={handleInputBlur}
confirmType="send"
onConfirm={handleSendReply}
/>
<View className="input-actions">
<View
className={`send-btn ${replyContent.trim() ? 'active' : ''}`}
onClick={handleSendReply}
>
<Image
className="send-icon"
src={require('@/static/message/send-icon.svg')}
/>
</View>
<View className={`reply-input-container ${showReplyInput ? 'show' : ''}`}>
<View className="reply-input-wrapper">
<View className="input-row">
<Input
className="reply-input"
type="text"
placeholder={`回复 ${replyTarget?.user_nickname || ''}`}
value={replyContent}
focus={inputFocus}
adjustPosition={true}
cursorSpacing={30}
holdKeyboard={false}
onInput={(e) => setReplyContent(e.detail.value)}
onBlur={handleInputBlur}
confirmType="send"
onConfirm={handleSendReply}
/>
<View className="input-actions">
<View
className={`send-btn ${replyContent.trim() ? 'active' : ''}`}
onClick={handleSendReply}
>
<Image
className="send-icon"
src={require('@/static/message/send-icon.svg')}
/>
</View>
</View>
</View>
</View>
</>
)}
</View>
</>
</View>
);
};