게시글 상세 목록으로 버튼 추가

This commit is contained in:
nevermoregb 2025-04-07 20:43:33 +09:00
parent 9e578109e1
commit 1c483ef727
3 changed files with 26 additions and 4 deletions

View File

@ -27,10 +27,16 @@
<!-- 수정, 삭제 버튼 -->
<template v-if="!isDeletedComment && (unknown || isCommentAuthor || isAuthor)">
<div class="float-end ms-1">
<slot name="gobackBtn"></slot>
<EditButton @click.stop="editClick" :is-pushed="isEditPushed" />
<DeleteButton :class="'ms-1'" @click.stop="deleteClick" :is-pushed="isDeletePushed" />
</div>
</template>
<template v-else>
<div class="float-end ms-1">
<slot name="gobackBtn"></slot>
</div>
</template>
<!-- 좋아요, 싫어요 버튼 (댓글에서만 표시) -->
<BoardRecommendBtn

View File

@ -190,9 +190,9 @@
searchText: searchText.value,
showNotice: showNotices.value,
};
//localStorage.removeItem
//
//localStorage.setItem(`boardList_${seq}`, JSON.stringify(query));
localStorage.setItem(`boardList_${seq}`, JSON.stringify(query));
};
//
@ -384,5 +384,4 @@
position: relative;
top: -1px;
}
</style>

View File

@ -21,7 +21,14 @@
:is-delete-pushed="isDeletePushed"
@editClick="editClick"
@deleteClick="deleteClick"
/>
>
<!-- 목록으로 버튼 -->
<template #gobackBtn>
<button class="btn btn-label-primary btn-icon me-1" @click="goList">
<i class="bx bx-left-arrow-alt"></i>
</button>
</template>
</BoardProfile>
<!-- 비밀번호 입력창 (익명일 경우) -->
<div v-if="isPassword && unknown" class="mt-3 w-px-200 ms-auto">
@ -884,6 +891,16 @@
}
};
//
const goList = () => {
//
const getFilter = localStorage.getItem(`boardList_${currentBoardId.value}`);
router.push({
name: 'BoardList',
query: getFilter ? JSON.parse(getFilter) : '',
});
};
// ( )
const handleCommentDeleted = deletedCommentId => {
//