warning수정
This commit is contained in:
parent
63f8f167eb
commit
4720e61958
@ -16,7 +16,7 @@
|
||||
@updateReaction="handleUpdateReaction"
|
||||
/>
|
||||
<!-- 댓글 비밀번호 입력창 (익명일 경우) -->
|
||||
<div v-if="isCommentPassword === comment.commentId && unknown" class="mt-3 w-25 ms-auto">
|
||||
<div v-if="currentPasswordCommentId === comment.commentId && unknown" class="mt-3 w-25 ms-auto">
|
||||
<div class="input-group">
|
||||
<input
|
||||
type="password"
|
||||
@ -59,6 +59,7 @@
|
||||
:isCommentProfile="true"
|
||||
:isCommentAuthor="child.isCommentAuthor"
|
||||
:isCommentPassword="isCommentPassword"
|
||||
:currentPasswordCommentId="currentPasswordCommentId"
|
||||
@editClick="handleReplyEditClick"
|
||||
@deleteClick="$emit('deleteClick', child)"
|
||||
@submitEdit="(comment, editedContent) => $emit('submitEdit', comment, editedContent)"
|
||||
@ -111,6 +112,9 @@ const props = defineProps({
|
||||
passwordCommentAlert: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
currentPasswordCommentId: {
|
||||
type: Number
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@ -12,6 +12,7 @@
|
||||
:isEditTextarea="comment.isEditTextarea"
|
||||
:isCommentPassword="isCommentPassword"
|
||||
:passwordCommentAlert="passwordCommentAlert || ''"
|
||||
:currentPasswordCommentId="currentPasswordCommentId"
|
||||
@editClick="handleEditClick"
|
||||
@deleteClick="handleDeleteClick"
|
||||
@submitPassword="submitPassword"
|
||||
@ -53,6 +54,9 @@ const props = defineProps({
|
||||
passwordCommentAlert: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
currentPasswordCommentId: {
|
||||
type: Number
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@ -102,6 +102,7 @@
|
||||
:isCommentPassword="isCommentPassword"
|
||||
:isEditTextarea="isEditTextarea"
|
||||
:passwordCommentAlert="passwordCommentAlert"
|
||||
:currentPasswordCommentId="currentPasswordCommentId"
|
||||
@editClick="editComment"
|
||||
@deleteClick="deleteComment"
|
||||
@updateReaction="handleCommentReaction"
|
||||
@ -489,10 +490,10 @@ const deleteComment = async (comment) => {
|
||||
// 익명 비밀번호 창 토글
|
||||
const toggleCommentPassword = (comment, button) => {
|
||||
console.log(comment.commentId)
|
||||
if (lastCommentClickedButton.value === button && isCommentPassword.value === comment.commentId) {
|
||||
isCommentPassword.value = false; // 비밀번호 창 닫기
|
||||
if (lastCommentClickedButton.value === button && currentPasswordCommentId.value === comment.commentId) {
|
||||
currentPasswordCommentId.value = null; // 비밀번호 창 닫기
|
||||
} else {
|
||||
isCommentPassword.value = comment.commentId; // 비밀번호 창 열기
|
||||
currentPasswordCommentId.value = comment.commentId; // 비밀번호 창 열기
|
||||
}
|
||||
|
||||
lastCommentClickedButton.value = button;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user