게시글 상세 목록으로 버튼 추가
This commit is contained in:
parent
9e578109e1
commit
1c483ef727
@ -27,10 +27,16 @@
|
|||||||
<!-- 수정, 삭제 버튼 -->
|
<!-- 수정, 삭제 버튼 -->
|
||||||
<template v-if="!isDeletedComment && (unknown || isCommentAuthor || isAuthor)">
|
<template v-if="!isDeletedComment && (unknown || isCommentAuthor || isAuthor)">
|
||||||
<div class="float-end ms-1">
|
<div class="float-end ms-1">
|
||||||
|
<slot name="gobackBtn"></slot>
|
||||||
<EditButton @click.stop="editClick" :is-pushed="isEditPushed" />
|
<EditButton @click.stop="editClick" :is-pushed="isEditPushed" />
|
||||||
<DeleteButton :class="'ms-1'" @click.stop="deleteClick" :is-pushed="isDeletePushed" />
|
<DeleteButton :class="'ms-1'" @click.stop="deleteClick" :is-pushed="isDeletePushed" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
<template v-else>
|
||||||
|
<div class="float-end ms-1">
|
||||||
|
<slot name="gobackBtn"></slot>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
<!-- 좋아요, 싫어요 버튼 (댓글에서만 표시) -->
|
<!-- 좋아요, 싫어요 버튼 (댓글에서만 표시) -->
|
||||||
<BoardRecommendBtn
|
<BoardRecommendBtn
|
||||||
|
|||||||
@ -190,9 +190,9 @@
|
|||||||
searchText: searchText.value,
|
searchText: searchText.value,
|
||||||
showNotice: showNotices.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;
|
position: relative;
|
||||||
top: -1px;
|
top: -1px;
|
||||||
}
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@ -21,7 +21,14 @@
|
|||||||
:is-delete-pushed="isDeletePushed"
|
:is-delete-pushed="isDeletePushed"
|
||||||
@editClick="editClick"
|
@editClick="editClick"
|
||||||
@deleteClick="deleteClick"
|
@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">
|
<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 => {
|
const handleCommentDeleted = deletedCommentId => {
|
||||||
// 댓글 삭제
|
// 댓글 삭제
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user