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
51
components/lib/paginator/CurrentPageReport.vue
Executable file
51
components/lib/paginator/CurrentPageReport.vue
Executable file
|
@ -0,0 +1,51 @@
|
|||
<template>
|
||||
<span class="p-paginator-current">{{ text }}</span>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
name: 'CurrentPageReport',
|
||||
props: {
|
||||
pageCount: {
|
||||
type: Number,
|
||||
default: 0
|
||||
},
|
||||
currentPage: {
|
||||
type: Number,
|
||||
default: 0
|
||||
},
|
||||
page: {
|
||||
type: Number,
|
||||
default: 0
|
||||
},
|
||||
first: {
|
||||
type: Number,
|
||||
default: 0
|
||||
},
|
||||
rows: {
|
||||
type: Number,
|
||||
default: 0
|
||||
},
|
||||
totalRecords: {
|
||||
type: Number,
|
||||
default: 0
|
||||
},
|
||||
template: {
|
||||
type: String,
|
||||
default: '({currentPage} of {totalPages})'
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
text() {
|
||||
let text = this.template
|
||||
.replace('{currentPage}', this.currentPage)
|
||||
.replace('{totalPages}', this.pageCount)
|
||||
.replace('{first}', this.pageCount > 0 ? this.first + 1 : 0)
|
||||
.replace('{last}', Math.min(this.first + this.rows, this.totalRecords))
|
||||
.replace('{rows}', this.rows)
|
||||
.replace('{totalRecords}', this.totalRecords);
|
||||
|
||||
return text;
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue