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>
</template>
<template v-else-if="comment.isDeleted">
<p class="m-0 text-muted">댓글이 삭제되었습니다.</p>
</template>
<template v-else>
<p class="m-0">{{ comment.content }}</p>
</template>
</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"/>
<BoardCommentArea v-if="isComment" :unknown="unknown" @submitComment="submitComment"/>
@ -172,12 +172,14 @@ watch(() => props.comment.isEditTextarea, (newVal) => {
}
});
watch(() => props.comment.isDeleted, () => {
if (newVal) {
localEditedContent.value = "댓글이 삭제되었습니다."; // UI
props.comment.isEditTextarea = false;
}
});
// watch(() => props.comment.isDeleted, () => {
// console.log("BoardComment - isDeleted :", newVal);
// if (newVal) {
// localEditedContent.value = " ."; // UI
// props.comment.isEditTextarea = false;
// }
// });
//
const submitEdit = () => {

View File

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