TahaSh / vue-paginate

A simple vue.js plugin to paginate data
MIT License
594 stars 103 forks source link

How can I get the current page number? #132

Closed JosMigue closed 3 years ago

harunkocacaliskan commented 3 years ago

From documentation;

Listening to links @change event

When the current page changes, PaginateLinks emits an event called change to inform you about that. It also passes the switched page numbers with it, if you need them.

<paginate-links
  for="languages"
  @change="onLangsPageChange"
></paginate-links>
methods: {
  onLangsPageChange (toPage, fromPage) {
    // handle here…
  }
}

Check my jsfiddle

JosMigue commented 3 years ago

Thanks, it works