wt-pagination.vue
Specs
Props
| Name | Required | Types | Default | Description | Example | Deprecated |
|---|---|---|---|---|---|---|
v-model |
string , number |
- | SIZE CHANGE IS DEBOUNCED | |||
next |
boolean |
false |
Is false, disables paging arrow | |||
prev |
boolean |
false |
Is false, disables paging arrow | |||
debounce |
boolean |
false |
If true, @change event is delayed for debounceDelay from last change | |||
debounceDelay |
number |
1000 |
Debounce delay in milliseconds |
Events
| Name | Params | Description |
|---|---|---|
change |
||
input |
||
prev |
||
next |
Example Pagination
Code
vue
<script setup>
import { ref } from 'vue';
const size = ref(10);
const isNext = ref(true);
const isPrev = ref(false);
function callAlert(value) {
alert(value);
}
</script>
<template>
<wt-pagination
:size="size"
:next="isNext"
:prev="isPrev"
@input="size = $event"
@next="callAlert('next')"
@prev="callAlert('prev')"
/>
</template>
<style scoped lang="scss"></style>