<p class="rbd-pdf-pagination">
<a-button
type="link"
@click="currentPage = 1"
:disabled="currentPage == 1"
>
首页
</a-button>
<a-button
type="link"
@click="changePdfPage(0)"
:disabled="currentPage == 1"
>
上一页
</a-button>
<span>{{ currentPage }} / {{ pageCount }}</span>
<a-button
type="link"
@click="changePdfPage(1)"
:disabled="currentPage == pageCount"
>
下一页
</a-button>
</p>
pageCount: 0,
currentPage: 0,
changePdfPage(val) {
// console.log(val)
if (val === 0 && this.currentPage > 1) {
this.currentPage--;
// console.log(this.currentPage)
}
if (val === 1 && this.currentPage < this.pageCount) {
this.currentPage++;
// console.log(this.currentPage)
}