Owlcarousel2 - 如何检查最后一项

Owlcarousel2 - how to check the last item

如何查看最后一项?在版本 1 中有函数 "maximumItem"

afterAction: function () {
if (this.currentItem == this.maximumItem) {
}
$(".owl-carousel").on('initialized.owl.carousel changed.owl.carousel refreshed.owl.carousel', function (e) {
    if (!e.namespace) return;
    var carousel = e.relatedTarget,
        current = carousel.current();
    if (current === carousel.maximum()) {
      ...
    }
});