isDeleted 삭제후 메세지 남기기 하는중

This commit is contained in:
kimdaae328 2025-02-28 14:43:18 +09:00
parent f5911247fb
commit 40584f0269
2 changed files with 14 additions and 12 deletions

View File

@ -38,15 +38,15 @@
</div> </div>
</template> </template>
<template v-else-if="comment.isDeleted">
<p class="m-0 text-muted">댓글이 삭제되었습니다.</p>
</template>
<template v-else> <template v-else>
<p class="m-0">{{ comment.content }}</p> <p class="m-0">{{ comment.content }}</p>
</template> </template>
</div> </div>
<!-- <p>현재 isDeleted : {{ isDeleted }}</p> -->
<!-- <template v-if="isDeleted">
<p class="m-0 text-muted">댓글이 삭제되었습니다.</p>
</template> -->
<PlusButton v-if="isPlusButton" @click="toggleComment" class="mt-6"/> <PlusButton v-if="isPlusButton" @click="toggleComment" class="mt-6"/>
<BoardCommentArea v-if="isComment" :unknown="unknown" @submitComment="submitComment"/> <BoardCommentArea v-if="isComment" :unknown="unknown" @submitComment="submitComment"/>
@ -172,12 +172,14 @@ watch(() => props.comment.isEditTextarea, (newVal) => {
} }
}); });
watch(() => props.comment.isDeleted, () => { // watch(() => props.comment.isDeleted, () => {
if (newVal) { // console.log("BoardComment - isDeleted :", newVal);
localEditedContent.value = "댓글이 삭제되었습니다."; // UI
props.comment.isEditTextarea = false; // if (newVal) {
} // localEditedContent.value = " ."; // UI
}); // props.comment.isEditTextarea = false;
// }
// });
// //
const submitEdit = () => { const submitEdit = () => {

View File

@ -10,7 +10,7 @@
:comment="comment" :comment="comment"
:isCommentAuthor="comment.isCommentAuthor" :isCommentAuthor="comment.isCommentAuthor"
:isEditTextarea="comment.isEditTextarea" :isEditTextarea="comment.isEditTextarea"
:isDeleted="comment.isDeleted" :isDeleted="isDeleted"
:isCommentPassword="isCommentPassword" :isCommentPassword="isCommentPassword"
:passwordCommentAlert="passwordCommentAlert || ''" :passwordCommentAlert="passwordCommentAlert || ''"
:currentPasswordCommentId="currentPasswordCommentId" :currentPasswordCommentId="currentPasswordCommentId"