From 8d6ae54a9bb3cb9c0aa262cb82b9e5dc2929da3c Mon Sep 17 00:00:00 2001 From: kimdaae328 Date: Fri, 21 Feb 2025 14:18:08 +0900 Subject: [PATCH] =?UTF-8?q?=EC=9D=B5=EB=AA=85=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/board/BoardProfile.vue | 2 +- src/views/board/BoardView.vue | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/components/board/BoardProfile.vue b/src/components/board/BoardProfile.vue index 796ab40..766bc31 100644 --- a/src/components/board/BoardProfile.vue +++ b/src/components/board/BoardProfile.vue @@ -61,7 +61,7 @@ const props = defineProps({ }, profileName: { type: String, - default: null, + default: '익명', }, unknown: { type: Boolean, diff --git a/src/views/board/BoardView.vue b/src/views/board/BoardView.vue index e52e404..a0e0824 100644 --- a/src/views/board/BoardView.vue +++ b/src/views/board/BoardView.vue @@ -149,7 +149,7 @@ const comments = ref([]); const route = useRoute(); const router = useRouter(); const currentBoardId = ref(Number(route.params.id)); -const unknown = computed(() => profileName.value === null); +const unknown = computed(() => profileName.value === '익명'); const currentUserId = ref('김자바'); // 현재 로그인한 사용자 id const authorId = ref(null); // 작성자 id @@ -190,7 +190,7 @@ const fetchBoardDetails = async () => { // API 응답 데이터 반영 // const boardDetail = data.boardDetail || {}; - profileName.value = data.author || null; + profileName.value = data.author || '익명'; // 익명확인하고 싶을때 // profileName.value = 'null; @@ -277,7 +277,7 @@ const fetchComments = async (page = 1) => { commentId: comment.LOCCMTSEQ, // 댓글 ID boardId: comment.LOCBRDSEQ, parentId: comment.LOCCMTPNT, // 부모 ID - author: comment.author || null, + author: comment.author || '익명', content: comment.LOCCMTRPY, likeCount: comment.likeCount || 0, dislikeCount: comment.dislikeCount || 0,