-
+
@@ -64,7 +68,7 @@ const props = defineProps({
});
// emits 정의
-const emit = defineEmits(['submitComment']);
+const emit = defineEmits(['submitComment', 'updateReaction']);
// 댓글 입력 창 토글
const isComment = ref(false);
@@ -74,10 +78,16 @@ const toggleComment = () => {
// 부모 컴포넌트에 대댓글 추가 요청
const submitComment = (newComment) => {
- emit('submitComment', { parentId: props.comment.id, ...newComment });
+ emit('submitComment', { parentId: props.comment.commentId, ...newComment });
isComment.value = false;
};
+// 좋아요, 싫어요
+const handleUpdateReaction = (reactionData) => {
+ console.log(`🛠 좋아요/싫어요 클릭됨:`, reactionData);
+ // emit('updateReaction', { boardId: props.comment.boardId, commentId: props.comment.id, ...reactionData });
+};
+
\ No newline at end of file
diff --git a/src/components/board/BoardCommentList.vue b/src/components/board/BoardCommentList.vue
index 65546c4..d751802 100644
--- a/src/components/board/BoardCommentList.vue
+++ b/src/components/board/BoardCommentList.vue
@@ -2,12 +2,13 @@
@@ -25,10 +26,15 @@ const props = defineProps({
}
});
-const emit = defineEmits(['submitComment']);
+const emit = defineEmits(['submitComment', 'updateReaction']);
const submitComment = (replyData) => {
emit('submitComment', replyData);
};
+const handleUpdateReaction = (reactionData) => {
+ console.log(`📢 부모 컴포넌트에서 이벤트 수신:`, reactionData);
+ // emit('updateReaction', { boardId: props.comment.boardId, commentId: props.comment.id, ...reactionData });
+};
+
diff --git a/src/components/board/BoardProfile.vue b/src/components/board/BoardProfile.vue
index 463d2e8..d818118 100644
--- a/src/components/board/BoardProfile.vue
+++ b/src/components/board/BoardProfile.vue
@@ -42,13 +42,13 @@
-