2022-09-06 12:03:37 +00:00
|
|
|
<template>
|
2022-12-08 11:04:25 +00:00
|
|
|
<JTPInput :modelValue="page" class="p-paginator-page-input" :aria-label="inputArialabel" :disabled="disabled" @update:modelValue="onChange($event)"></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);
|
|
|
|
}
|
|
|
|
},
|
2022-12-08 11:04:25 +00:00
|
|
|
computed: {
|
|
|
|
inputArialabel() {
|
|
|
|
return this.$primevue.config.locale.aria ? this.$primevue.config.locale.aria.jumpToPageInputLabel : undefined;
|
|
|
|
}
|
|
|
|
},
|
2022-09-06 12:03:37 +00:00
|
|
|
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>
|