primevue-mirror/components/paginator/JumpToPageInput.vue

27 lines
586 B
Vue
Raw Normal View History

2022-09-06 12:03:37 +00:00
<template>
2022-09-14 11:26:01 +00:00
<JTPInput :modelValue="page" @update:modelValue="onChange($event)" class="p-paginator-page-input" :disabled="disabled"></JTPInput>
2022-09-06 12:03:37 +00:00
</template>
<script>
import InputNumber from 'primevue/inputnumber';
export default {
name: 'JumpToPageInput',
inheritAttrs: false,
emits: ['page-change'],
props: {
page: Number,
pageCount: Number,
disabled: Boolean
},
methods: {
onChange(value) {
this.$emit('page-change', value - 1);
}
},
components: {
2022-09-14 11:26:01 +00:00
JTPInput: InputNumber
2022-09-06 12:03:37 +00:00
}
2022-09-14 11:26:01 +00:00
};
2022-09-06 12:03:37 +00:00
</script>