diff --git a/src/components/board/BoardComment.vue b/src/components/board/BoardComment.vue index 0dafc9a..c8d4245 100644 --- a/src/components/board/BoardComment.vue +++ b/src/components/board/BoardComment.vue @@ -11,7 +11,7 @@ :isLike="!isLike" :isCommentPassword="comment.isCommentPassword" :isCommentProfile="true" - @editClick="$emit('editClick', comment)" + @editClick="aaaa" @deleteClick="$emit('deleteClick', comment)" @updateReaction="handleUpdateReaction" /> @@ -56,11 +56,19 @@ :key="child.commentId" class="mt-8 pt-6 ps-10 border-top" > + + @@ -155,4 +163,8 @@ const submitEdit = () => { emit('submitEdit', props.comment, localEditedContent.value); }; +const aaaa = () => { + emit('editClick', props.comment); +} + diff --git a/src/components/board/BoardCommentArea.vue b/src/components/board/BoardCommentArea.vue index 30e9084..e25212e 100644 --- a/src/components/board/BoardCommentArea.vue +++ b/src/components/board/BoardCommentArea.vue @@ -79,7 +79,7 @@ const props = defineProps({ const comment = ref(''); const password = ref(''); -const isCheck = ref(props.unknown); +const isCheck = ref(''); const emit = defineEmits(['submitComment']); diff --git a/src/components/board/BoardCommentList.vue b/src/components/board/BoardCommentList.vue index 9813d9b..115fe5d 100644 --- a/src/components/board/BoardCommentList.vue +++ b/src/components/board/BoardCommentList.vue @@ -5,6 +5,8 @@ :key="comment.commentId" class="mt-6 border-bottom pb-6" > + + @@ -76,4 +78,29 @@ const handleUpdateReaction = (reactionData, commentId, boardId) => { const submitPassword = (comment, password) => { emit('submitPassword', comment, password); }; + +const handleEditClick = (comment) => { + emit('editClick', comment); +}; + +const handleSubmitEdit = (comment, editedContent) => { + emit("submitEdit", comment, editedContent); +}; + +const handleDeleteClick = (comment) => { + if (comment.parentId) { + emit('deleteClick', comment); // 대댓글 삭제 + } else { + emit('deleteClick', comment); // 댓글 삭제 + } +}; + +const handleCancelEdit = (comment) => { + if (comment.parentId) { + emit('cancelEdit', comment); // 대댓글 수정 취소 + } else { + emit('cancelEdit', comment); // 댓글 수정 취소 + } +}; + diff --git a/src/components/board/BoardProfile.vue b/src/components/board/BoardProfile.vue index 90c8db2..2c280f5 100644 --- a/src/components/board/BoardProfile.vue +++ b/src/components/board/BoardProfile.vue @@ -23,7 +23,7 @@
-