From ec6a3c6dc91942bfa5e04ce9ac075743fdcf5ad9 Mon Sep 17 00:00:00 2001 From: kimdaae328 Date: Tue, 21 Jan 2025 13:30:50 +0900 Subject: [PATCH] =?UTF-8?q?=EC=B2=A8=EB=B6=80=ED=8C=8C=EC=9D=BC=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/list/BoardCard.vue | 11 ++++++++++- src/components/list/BoardCardList.vue | 1 + src/views/board/BoardList.vue | 2 ++ 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/src/components/list/BoardCard.vue b/src/components/list/BoardCard.vue index f15061b..327e1e7 100644 --- a/src/components/list/BoardCard.vue +++ b/src/components/list/BoardCard.vue @@ -18,7 +18,12 @@ {{ category }} -
{{ title }}
+
+ {{ title }} + + + +

{{ content }}

@@ -81,6 +86,10 @@ const props = defineProps({ type: Number, default: 0, }, + attachment: { + type: Boolean, + default: false, + } }); // computed 속성 diff --git a/src/components/list/BoardCardList.vue b/src/components/list/BoardCardList.vue index 3c66287..23f55ca 100644 --- a/src/components/list/BoardCardList.vue +++ b/src/components/list/BoardCardList.vue @@ -13,6 +13,7 @@ :views="post.views" :likes="post.likes" :comments="post.comments" + :attachment="post.attachment" /> diff --git a/src/views/board/BoardList.vue b/src/views/board/BoardList.vue index 8da52e1..2f5d056 100644 --- a/src/views/board/BoardList.vue +++ b/src/views/board/BoardList.vue @@ -127,6 +127,7 @@ const fetchGeneralPosts = async (page = 1) => { views: post.cnt || 0, likes: post.likeCount || 0, comments: post.commentCount || 0, + attachment: post.hasAttachment || false, })); // 페이지네이션 정보 업데이트 @@ -165,6 +166,7 @@ const fetchNoticePosts = async () => { views: post.cnt || 0, likes: post.likeCount || 0, comments: post.commentCount || 0, + attachment: post.hasAttachment || false, })); } else { console.error("데이터 오류:", response.data);