naive-ui/demo/documentation/components/pagination/enUS/slot.md
2020-02-04 11:55:39 +08:00

500 B

Page Slot

The pagination has a property page-slot, try it and you will understand. It aims to solving misclicks caused by the length changing of pagination.

<n-pagination
  v-model="page"
  :page-count="100"
/>
<n-pagination
  v-model="page"
  :page-count="100"
  :page-slot="8"
/>
<n-pagination
  v-model="page"
  :page-count="100"
  :page-slot="7"
/>
export default {
  data () {
    return {
      page: 2
    }
  }
}
.n-pagination {
  margin-bottom: 12px;
}