첨부파일 수정
This commit is contained in:
parent
922fc09c2d
commit
5bd56faf11
@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<BoardProfile :profileName="comment.author" :showDetail="false" :author="true" />
|
<BoardProfile :profileName="comment.author" :showDetail="false" :author="true" :isChild="isChild" />
|
||||||
<div class="mt-6">
|
<div class="mt-6">
|
||||||
<p class="m-0">{{ comment.content }}</p>
|
<p class="m-0">{{ comment.content }}</p>
|
||||||
</div>
|
</div>
|
||||||
@ -14,7 +14,7 @@
|
|||||||
:key="child.id"
|
:key="child.id"
|
||||||
class="pt-8 ps-10"
|
class="pt-8 ps-10"
|
||||||
>
|
>
|
||||||
<BoardComment :comment="child" :isPlusButton="false" @submitComment="addChildComment" />
|
<BoardComment :comment="child" :isPlusButton="false" :isChild="true" @submitComment="addChildComment" />
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<!-- <ul class="list-unstyled twoDepth">
|
<!-- <ul class="list-unstyled twoDepth">
|
||||||
@ -46,7 +46,11 @@ const props = defineProps({
|
|||||||
isPlusButton: {
|
isPlusButton: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: true,
|
default: true,
|
||||||
}
|
},
|
||||||
|
isChild: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false,
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
// emits 정의
|
// emits 정의
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
<div class="d-flex justify-content-between align-items-center flex-wrap mb-6 gap-2">
|
<div class="d-flex justify-content-between align-items-center flex-wrap mb-6 gap-2">
|
||||||
<!-- 제목 섹션 -->
|
<!-- 제목 섹션 -->
|
||||||
<div class="me-1">
|
<div class="me-1">
|
||||||
<h5 class="mb-0">{{ boardTitle }}</h5>
|
<h5 class="mb-0">{{ boardTitle }}adada</h5>
|
||||||
</div>
|
</div>
|
||||||
<!-- 첨부파일 섹션 -->
|
<!-- 첨부파일 섹션 -->
|
||||||
<div v-if="dropdownItems.length > 0" class="btn-group">
|
<div v-if="dropdownItems.length > 0" class="btn-group">
|
||||||
|
|||||||
@ -38,7 +38,7 @@
|
|||||||
<i class='bx bx-trash'></i>
|
<i class='bx bx-trash'></i>
|
||||||
</button> -->
|
</button> -->
|
||||||
</template>
|
</template>
|
||||||
<BoardRecommendBtn :isRecommend="false" />
|
<BoardRecommendBtn v-if="!isChild" :isRecommend="false" />
|
||||||
</template>
|
</template>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -84,6 +84,10 @@ const props = defineProps({
|
|||||||
type: Number,
|
type: Number,
|
||||||
default: null,
|
default: null,
|
||||||
},
|
},
|
||||||
|
isChild: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false,
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
const boardId = 100; //수정필요!!
|
const boardId = 100; //수정필요!!
|
||||||
|
|||||||
@ -16,12 +16,33 @@
|
|||||||
</div>
|
</div>
|
||||||
<!-- 게시글 내용 -->
|
<!-- 게시글 내용 -->
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<h5 class="mb-4">{{ boardTitle }}</h5>
|
|
||||||
<!-- HTML 콘텐츠 렌더링 -->
|
|
||||||
<div class="board-content text-body" style="line-height: 1.6;" v-html="$common.contentToHtml(boardContent)">
|
|
||||||
|
|
||||||
|
<div class="d-flex justify-content-between align-items-center flex-wrap mb-6 gap-2">
|
||||||
|
<!-- 제목 섹션 -->
|
||||||
|
<div class="me-1">
|
||||||
|
<h5 class="mb-4">{{ boardTitle }}</h5>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- 첨부파일 섹션 -->
|
||||||
|
<div v-if="attachments" class="btn-group">
|
||||||
|
<button type="button" class="btn btn-label-secondary dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false">
|
||||||
|
<i class="fa-solid fa-download me-2"></i>
|
||||||
|
첨부파일
|
||||||
|
<!-- (<span class="attachment-num">{{ dropdownItems.length }}</span>) -->
|
||||||
|
</button>
|
||||||
|
<!-- <ul class="dropdown-menu">
|
||||||
|
<li v-for="(item, index) in dropdownItems" :key="index">
|
||||||
|
<a class="dropdown-item" href="javascript:void(0);">
|
||||||
|
{{ item.label }}
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
</ul> -->
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<!-- HTML 콘텐츠 렌더링 -->
|
||||||
|
<div class="board-content text-body" style="line-height: 1.6;" v-html="$common.contentToHtml(boardContent)"></div>
|
||||||
|
|
||||||
<!-- 좋아요 버튼 -->
|
<!-- 좋아요 버튼 -->
|
||||||
<div class="row justify-content-center my-10">
|
<div class="row justify-content-center my-10">
|
||||||
<BoardRecommendBtn
|
<BoardRecommendBtn
|
||||||
@ -35,11 +56,11 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 첨부파일 목록 -->
|
<!-- 첨부파일 목록 -->
|
||||||
<ul v-if="attachments.length" class="attachments mt-4 list-unstyled">
|
<!-- <ul v-if="attachments.length" class="attachments mt-4 list-unstyled">
|
||||||
<li v-for="(attachment, index) in attachments" :key="index" class="mb-2">
|
<li v-for="(attachment, index) in attachments" :key="index" class="mb-2">
|
||||||
<a :href="attachment.url" target="_blank" class="text-decoration-none">{{ attachment.name }}</a>
|
<a :href="attachment.url" target="_blank" class="text-decoration-none">{{ attachment.name }}</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul> -->
|
||||||
|
|
||||||
<!-- 댓글 영역 -->
|
<!-- 댓글 영역 -->
|
||||||
<BoardComentArea :comments="comments" />
|
<BoardComentArea :comments="comments" />
|
||||||
@ -79,6 +100,7 @@ const attachments = ref([]);
|
|||||||
const views = ref(0);
|
const views = ref(0);
|
||||||
const likes = ref(0);
|
const likes = ref(0);
|
||||||
const dislikes = ref(0);
|
const dislikes = ref(0);
|
||||||
|
const attachment = ref(false);
|
||||||
|
|
||||||
// 라우트에서 ID 가져오기
|
// 라우트에서 ID 가져오기
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
@ -108,6 +130,7 @@ const fetchBoardDetails = async () => {
|
|||||||
views.value = data.cnt || 0;
|
views.value = data.cnt || 0;
|
||||||
likes.value = data.likeCount || 0;
|
likes.value = data.likeCount || 0;
|
||||||
dislikes.value = data.dislikeCount || 0;
|
dislikes.value = data.dislikeCount || 0;
|
||||||
|
attachment.value = data.hasAttachment || null;
|
||||||
|
|
||||||
attachments.value = data.attachments || [];
|
attachments.value = data.attachments || [];
|
||||||
comments.value = data.comments || [];
|
comments.value = data.comments || [];
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user