Skip to content

Commit

Permalink
BoardComponent watch에 log 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
yhlee002 committed Jul 17, 2024
1 parent 175ac30 commit 80be141
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/components/board/BoardComponent.vue
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ onUpdated(() => {
})
watch(orderBy, async (newVal, oldVal) => {
console.info('orderBy watch 발동', newVal);
await boardStore.getBoards(boardStore.currentPage, 10, null, null, newVal);
query.value = "";
Expand All @@ -46,13 +48,15 @@ watch(orderBy, async (newVal, oldVal) => {
});
watch(() => props.page, async (newVal, oldVal) => {
console.info('props.page watch 발동', newVal);
if (newVal) {
boardStore.currentPage = Number(newVal);
} else {
boardStore.currentPage = 1;
}
await boardStore.getBoards(boardStore.currentPage, 10, null, null, orderBy.value);
boardStore.getBoards(boardStore.currentPage, 10, null, null, orderBy.value);
console.log('업데이트 페이지네이션 정보', {
'현재 page': boardStore.currentPage,
Expand Down

0 comments on commit 80be141

Please sign in to comment.