primevue-mirror/apps/showcase/doc/paginator/CurrentPageReportDoc.vue

66 lines
1.9 KiB
Vue
Raw Normal View History

2023-02-28 08:29:30 +00:00
<template>
<DocSectionText v-bind="$attrs">
<p>Current page report item in the template displays information about the pagination state. Default value is ({currentPage} of {totalPages}) whereas available placeholders are the following;</p>
2024-05-20 12:14:38 +00:00
<ul class="mb-6 leading-loose">
2023-02-28 08:29:30 +00:00
<li>{currentPage}</li>
<li>{totalPages}</li>
<li>{rows}</li>
<li>{first}</li>
<li>{last}</li>
<li>{totalRecords}</li>
</ul>
</DocSectionText>
<div class="card">
<Paginator :rows="10" :totalRecords="120" template="FirstPageLink PrevPageLink CurrentPageReport NextPageLink LastPageLink" currentPageReportTemplate="Showing {first} to {last} of {totalRecords}" />
</div>
<DocSectionCode :code="code" />
</template>
<script>
export default {
data() {
return {
first: 0,
code: {
2023-09-22 12:54:14 +00:00
basic: `
<Paginator :rows="10" :totalRecords="120" template="FirstPageLink PrevPageLink CurrentPageReport NextPageLink LastPageLink"
2023-10-15 09:38:39 +00:00
currentPageReportTemplate="Showing {first} to {last} of {totalRecords}" />
`,
2023-09-22 12:54:14 +00:00
options: `
<template>
2023-02-28 08:29:30 +00:00
<div class="card">
<Paginator :rows="10" :totalRecords="120" template="FirstPageLink PrevPageLink CurrentPageReport NextPageLink LastPageLink"
currentPageReportTemplate="Showing {first} to {last} of {totalRecords}" />
</div>
</template>
<script>
export default {
data() {
return {
first: 0
};
}
};
2023-10-15 09:38:39 +00:00
<\/script>
`,
2023-09-22 12:54:14 +00:00
composition: `
<template>
2023-02-28 08:29:30 +00:00
<div class="card">
<Paginator :rows="10" :totalRecords="120" template="FirstPageLink PrevPageLink CurrentPageReport NextPageLink LastPageLink"
currentPageReportTemplate="Showing {first} to {last} of {totalRecords}" />
</div>
</template>
<script setup>
import { ref } from "vue";
const first = ref(0);
2023-10-15 09:38:39 +00:00
<\/script>
`
2023-02-28 08:29:30 +00:00
}
};
}
};
</script>