아이콘 간격 수정

This commit is contained in:
nevermoregb 2025-03-06 12:15:37 +09:00
parent 6c4fc7ac8e
commit 6ac3d587f8

View File

@ -10,12 +10,8 @@
<div class="profile-detail"> <div class="profile-detail">
<span>{{ date }}</span> <span>{{ date }}</span>
<template v-if="showDetail"> <template v-if="showDetail">
<span class="ms-2"> <span class="ms-2"> <i class="fa-regular fa-eye"></i> {{ views }} </span>
<i class="fa-regular fa-eye"></i> {{ views }} <span class="ms-1"> <i class="bx bx-comment"></i> {{ commentNum }} </span>
</span>
<span>
<i class="bx bx-comment"></i> {{ commentNum }}
</span>
</template> </template>
</div> </div>
</div> </div>
@ -29,37 +25,32 @@
</template> </template>
<!-- 좋아요, 싫어요 버튼 (댓글에서만 표시) --> <!-- 좋아요, 싫어요 버튼 (댓글에서만 표시) -->
<BoardRecommendBtn <BoardRecommendBtn v-if="isLike" :boardId="boardId" :comment="comment" @updateReaction="handleUpdateReaction" />
v-if="isLike"
:boardId="boardId"
:comment="comment"
@updateReaction="handleUpdateReaction"
/>
</div> </div>
</div> </div>
</template> </template>
<script setup> <script setup>
import { computed, defineProps, defineEmits } from 'vue'; import { computed, defineProps, defineEmits } from 'vue';
import DeleteButton from '../button/DeleteBtn.vue'; import DeleteButton from '../button/DeleteBtn.vue';
import EditButton from '../button/EditBtn.vue'; import EditButton from '../button/EditBtn.vue';
import BoardRecommendBtn from '../button/BoardRecommendBtn.vue'; import BoardRecommendBtn from '../button/BoardRecommendBtn.vue';
// //
const defaultProfile = "/img/icons/icon.png"; const defaultProfile = '/img/icons/icon.png';
// (Vue ) // (Vue )
const baseUrl = "http://localhost:10325/"; // API URL const baseUrl = 'http://localhost:10325/'; // API URL
// Props // Props
const props = defineProps({ const props = defineProps({
comment: { comment: {
type: Object, type: Object,
required: false, required: false,
}, },
boardId: { boardId: {
type: Number, type: Number,
required: false required: false,
}, },
commentId: { commentId: {
type: Number, type: Number,
@ -102,39 +93,36 @@ const props = defineProps({
isLike: { isLike: {
type: Boolean, type: Boolean,
default: false, default: false,
} },
}); });
const emit = defineEmits(['updateReaction', 'editClick', 'deleteClick']); const emit = defineEmits(['updateReaction', 'editClick', 'deleteClick']);
const isDeletedComment = computed(() => { const isDeletedComment = computed(() => {
return props.comment?.content === '삭제된 댓글입니다' && return props.comment?.content === '삭제된 댓글입니다' && props.comment?.updateAtRaw !== props.comment?.createdAtRaw;
props.comment?.updateAtRaw !== props.comment?.createdAtRaw; });
});
// //
const editClick = () => { const editClick = () => {
emit('editClick', { ...props.comment, unknown: props.unknown }); emit('editClick', { ...props.comment, unknown: props.unknown });
}; };
// //
const deleteClick = () => { const deleteClick = () => {
emit('deleteClick', { ...props.comment, unknown: props.unknown }); emit('deleteClick', { ...props.comment, unknown: props.unknown });
}; };
// / // /
const handleUpdateReaction = (reactionData) => { const handleUpdateReaction = reactionData => {
emit("updateReaction", { emit('updateReaction', {
boardId: props.boardId, boardId: props.boardId,
commentId: props.comment?.commentId, commentId: props.comment?.commentId,
...reactionData, ...reactionData,
}); });
}; };
// //
const getProfileImage = (profilePath) => { const getProfileImage = profilePath => {
return profilePath && profilePath.trim() return profilePath && profilePath.trim() ? `${baseUrl}upload/img/profile/${profilePath}` : defaultProfile;
? `${baseUrl}upload/img/profile/${profilePath}`
: defaultProfile;
}; };
</script> </script>