0

我的页面中有一个“转到”功能,我已经尝试更新实例中的“currentPage”属性,但这不起作用。

一旦 UIkit 没有特定的方法来改变页面,有办法做到吗?

4

1 回答 1

0

实际上,在深入研究 lib 的文件时,我发现了一个在实例中可用的方法“selectPage”。

this.pagination = UIkit.pagination('.uk-pagination');
this.pagination.options.items = itemsCount;
this.pagination.options.itemsOnPage = itemsPerPage;
this.pagination.init();

this.pagination.selectPage(parseInt(this.goToPage - 1, 10));
于 2017-10-15T21:17:39.533 回答