mirror of
https://github.com/primefaces/primevue.git
synced 2025-05-09 00:42:36 +00:00
Fixed #3802 - Improve folder structure for nuxt configurations
This commit is contained in:
parent
851950270b
commit
f5fe822afb
563 changed files with 1703 additions and 1095 deletions
38
components/lib/paginator/RowsPerPageDropdown.vue
Executable file
38
components/lib/paginator/RowsPerPageDropdown.vue
Executable file
|
@ -0,0 +1,38 @@
|
|||
<template>
|
||||
<RPPDropdown :modelValue="rows" :options="rowsOptions" optionLabel="label" optionValue="value" @update:modelValue="onChange($event)" class="p-paginator-rpp-options" :disabled="disabled"></RPPDropdown>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Dropdown from 'primevue/dropdown';
|
||||
|
||||
export default {
|
||||
name: 'RowsPerPageDropdown',
|
||||
emits: ['rows-change'],
|
||||
props: {
|
||||
options: Array,
|
||||
rows: Number,
|
||||
disabled: Boolean
|
||||
},
|
||||
methods: {
|
||||
onChange(value) {
|
||||
this.$emit('rows-change', value);
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
rowsOptions() {
|
||||
let opts = [];
|
||||
|
||||
if (this.options) {
|
||||
for (let i = 0; i < this.options.length; i++) {
|
||||
opts.push({ label: String(this.options[i]), value: this.options[i] });
|
||||
}
|
||||
}
|
||||
|
||||
return opts;
|
||||
}
|
||||
},
|
||||
components: {
|
||||
RPPDropdown: Dropdown
|
||||
}
|
||||
};
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue