我的页面中有一个“转到”功能,我已经尝试更新实例中的“currentPage”属性,但这不起作用。
一旦 UIkit 没有特定的方法来改变页面,有办法做到吗?
实际上,在深入研究 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));