-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
- Loading branch information
There are no files selected for viewing
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<template> | ||
<JTPDropdown :modelValue="page" :options="pageOptions" optionLabel="label" optionValue="value" | ||
@update:modelValue="onChange($event)" class="p-paginator-page-options"></JTPDropdown> | ||
</template> | ||
|
||
<script> | ||
import Dropdown from 'primevue/dropdown'; | ||
export default { | ||
name: 'JumpToPageDropdown', | ||
inheritAttrs: false, | ||
emits: ['page-change'], | ||
props: { | ||
page: Number, | ||
pageCount: Number | ||
}, | ||
methods: { | ||
onChange(value) { | ||
this.$emit('page-change', value); | ||
} | ||
}, | ||
computed: { | ||
pageOptions() { | ||
let opts = []; | ||
for(let i= 0; i < this.pageCount; i++) { | ||
opts.push({label: String(i), value: i}) | ||
} | ||
return opts; | ||
} | ||
}, | ||
components: { | ||
'JTPDropdown': Dropdown | ||
} | ||
} | ||
</script> |