Skip to content

Commit

Permalink
watch 작성 방식 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
yhlee002 committed Jul 17, 2024
1 parent edf2fb0 commit 11174a0
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/components/board/BoardComponent.vue
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@ onUpdated(() => {
console.info('component 업데이트 완료');
})
watch(orderBy, async (newVal, oldVal) => {
watch(() => {
return orderBy;
}, async (newVal, oldVal) => {
console.info('orderBy watch 발동', `${oldVal} -> ${newVal}`);
await boardStore.getBoards(boardStore.currentPage, 10, null, null, newVal);
Expand All @@ -47,7 +49,9 @@ watch(orderBy, async (newVal, oldVal) => {
renderCnt.value += 1;
});
watch(() => props.page, async (newVal, oldVal) => {
watch(() => {
return props.page;
}, async (newVal, oldVal) => {
console.info('props.page watch 발동', `${oldVal} -> ${newVal}`);
if (newVal) {
Expand Down

0 comments on commit 11174a0

Please sign in to comment.