1
This commit is contained in:
@@ -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>
|
||||
);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user