USE
-
npm i --save pagination-vue
-
import pagination from 'pagination-vue'
-
like this when use
template: ` <pagination :countTotal='11' :initialSelectedIndex='0' :countPage='5' :pageClick="paginationPageClick"></pagination>`components: pagination { console // you can get the click index}
- props
- paginationPageClick: function, callback with index
- count-total: max count, is optional
- count-page: how many items in a group, is optional, default is 5
- initialSelectedIndex: initial count, if u need, is optional