Skip to content

Commit ffbc425

Browse files
feat(pagination): use ole-pagination
1 parent 2565da3 commit ffbc425

File tree

1 file changed

+15
-7
lines changed

1 file changed

+15
-7
lines changed

src/views/ItemList.vue

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,20 @@
11
<template>
22
<ole-section>
3-
<div class="news-list-nav">
4-
<router-link v-if="page > 1" :to="'/' + type + '/' + (page - 1)">&lt; prev</router-link>
5-
<a v-else class="disabled">&lt; prev</a>
6-
<span>{{ page }}/{{ maxPage }}</span>
7-
<router-link v-if="hasMore" :to="'/' + type + '/' + (page + 1)">more &gt;</router-link>
8-
<a v-else class="disabled">more &gt;</a>
9-
</div>
3+
<ole-columns>
4+
<ole-column>
5+
<ole-pagination>
6+
<router-link tag="ole-pagination-link" v-if="page > 1" :to="'/' + type + '/' + (page - 1)">
7+
Prev
8+
</router-link>
9+
<ole-pagination-link current disabled>{{ page }}</ole-pagination-link>
10+
<ole-pagination-ellipsis></ole-pagination-ellipsis>
11+
<ole-pagination-link>{{ maxPage }}</ole-pagination-link>
12+
<router-link tag="ole-pagination-link" v-if="hasMore" :to="'/' + type + '/' + (page + 1)">
13+
Next
14+
</router-link>
15+
</ole-pagination>
16+
</ole-column>
17+
</ole-columns>
1018
<ole-container :key="displayedPage" v-if="displayedPage > 0">
1119
<item v-for="item in displayedItems" :key="item.id" :item="item">
1220
</item>

0 commit comments

Comments
 (0)