.
This commit is contained in:
parent
77f248cead
commit
4cf31aee12
@ -42,11 +42,7 @@
|
||||
<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"/>
|
||||
|
||||
@ -114,10 +110,6 @@ const props = defineProps({
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
isDeleted: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
isCommentPassword: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
@ -172,15 +164,6 @@ watch(() => props.comment.isEditTextarea, (newVal) => {
|
||||
}
|
||||
});
|
||||
|
||||
// watch(() => props.comment.isDeleted, () => {
|
||||
// console.log("BoardComment - isDeleted 상태 변경됨:", newVal);
|
||||
|
||||
// if (newVal) {
|
||||
// localEditedContent.value = "댓글이 삭제되었습니다."; // UI 반영
|
||||
// props.comment.isEditTextarea = false;
|
||||
// }
|
||||
// });
|
||||
|
||||
// 수정버튼
|
||||
const submitEdit = () => {
|
||||
emit('submitEdit', props.comment, localEditedContent.value);
|
||||
|
||||
@ -10,7 +10,6 @@
|
||||
:comment="comment"
|
||||
:isCommentAuthor="comment.isCommentAuthor"
|
||||
:isEditTextarea="comment.isEditTextarea"
|
||||
:isDeleted="isDeleted"
|
||||
:isCommentPassword="isCommentPassword"
|
||||
:passwordCommentAlert="passwordCommentAlert || ''"
|
||||
:currentPasswordCommentId="currentPasswordCommentId"
|
||||
@ -54,10 +53,6 @@ const props = defineProps({
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
isDeleted: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
passwordCommentAlert: {
|
||||
type: String,
|
||||
default: ''
|
||||
|
||||
@ -102,7 +102,6 @@
|
||||
:comments="commentsWithAuthStatus"
|
||||
:isCommentPassword="isCommentPassword"
|
||||
:isEditTextarea="isEditTextarea"
|
||||
:isDeleted="isDeleted"
|
||||
:passwordCommentAlert="passwordCommentAlert"
|
||||
:currentPasswordCommentId="currentPasswordCommentId"
|
||||
:password="password"
|
||||
@ -184,7 +183,6 @@ const currentPasswordCommentId = ref(null);
|
||||
const lastClickedButton = ref("");
|
||||
const lastCommentClickedButton = ref("");
|
||||
const isEditTextarea = ref(false);
|
||||
const isDeleted = ref(true);
|
||||
const commentAlert = ref('');
|
||||
|
||||
const updatePassword = (newPassword) => {
|
||||
@ -686,14 +684,6 @@ const deleteReplyComment = async (comment) => {
|
||||
|
||||
if (response.data.code === 200) {
|
||||
await fetchComments();
|
||||
|
||||
if (targetComment) {
|
||||
// console.log('타겟',targetComment)
|
||||
// ✅ 댓글 내용만 "삭제된 댓글입니다."로 변경하고, 구조는 유지
|
||||
targetComment.content = "댓글이 삭제되었습니다.";
|
||||
targetComment.author = "알 수 없음"; // 익명 처리
|
||||
targetComment.isDeleted = true; // ✅ 삭제 상태를 추가
|
||||
}
|
||||
} else {
|
||||
alert("댓글 삭제에 실패했습니다.");
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user