Skip to content

Commit

Permalink
ListComponent에 데이터 전달하지 않을시 조회되는지 확인
Browse files Browse the repository at this point in the history
  • Loading branch information
yhlee002 committed Jul 18, 2024
1 parent 778d1fc commit 5f060b7
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions src/components/board/BoardComponent.vue
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@ await boardStore.getWeeklyRecommendedTopBoards(5);
await boardStore.getWeeklyViewTopBoards(5);
watch(orderBy, async (newVal, oldVal) => {
console.info('orderBy watch 발동', `${oldVal} -> ${newVal}`);
await boardStore.getBoards(boardStore.currentPage, 10, null, null, newVal);
query.value = "";
Expand Down Expand Up @@ -66,7 +64,7 @@ watch(pageNum, async (newPage) => {
boardStore.currentPage = newPage;
await boardStore.getBoards(newPage, 10, null, null, orderBy.value);
// renderCnt.value += 1;
renderCnt.value += 1;
},
{immediate: true}
);
Expand Down Expand Up @@ -155,6 +153,15 @@ function writeNewPost() {
</select>
</div>

<!-- 임시 -->
<div>
<ul>
<li v-for="item in boardStore.listItems" :key="item.id">
{{item.title}}
</li>
</ul>
</div>

<ListComponent category="boards" :list="boardStore.listItems" :recommended="true"
:key="renderCnt"></ListComponent>
<Pagenation category="boards" :pages="boardStore.totalPages" :page="boardStore.currentPage"></Pagenation>
Expand Down

0 comments on commit 5f060b7

Please sign in to comment.