2023-02-28 08:29:30 +00:00
|
|
|
<template>
|
|
|
|
<DocSectionText v-bind="$attrs">
|
|
|
|
<p>There are two templates available named <i>start</i> and <i>end</i> to add custom content to these locations. Both templates get a state object as a slot property to provide the current page, first index and the rows.</p>
|
|
|
|
</DocSectionText>
|
|
|
|
<div class="card">
|
|
|
|
<Paginator :rows="10" :totalRecords="120" :rowsPerPageOptions="[10, 20, 30]">
|
|
|
|
<template #start="slotProps"> Page: {{ slotProps.state.page }} First: {{ slotProps.state.first }} Rows: {{ slotProps.state.rows }} </template>
|
|
|
|
<template #end>
|
|
|
|
<Button type="button" icon="pi pi-search" />
|
|
|
|
</template>
|
|
|
|
</Paginator>
|
|
|
|
</div>
|
|
|
|
<DocSectionCode :code="code" />
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
export default {
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
code: {
|
2023-09-22 12:54:14 +00:00
|
|
|
basic: `
|
|
|
|
<Paginator :rows="10" :totalRecords="120" :rowsPerPageOptions="[10, 20, 30]">
|
2023-02-28 08:29:30 +00:00
|
|
|
<template #start="slotProps">
|
|
|
|
Page: {{ slotProps.state.page }}
|
|
|
|
First: {{ slotProps.state.first }}
|
|
|
|
Rows: {{ slotProps.state.rows }}
|
|
|
|
</template>
|
|
|
|
<template #end>
|
|
|
|
<Button type="button" icon="pi pi-search" />
|
|
|
|
</template>
|
2023-10-15 09:38:39 +00:00
|
|
|
</Paginator>
|
|
|
|
`,
|
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" :rowsPerPageOptions="[10, 20, 30]">
|
|
|
|
<template #start="slotProps">
|
|
|
|
Page: {{ slotProps.state.page }}
|
|
|
|
First: {{ slotProps.state.first }}
|
|
|
|
Rows: {{ slotProps.state.rows }}
|
|
|
|
</template>
|
|
|
|
<template #end>
|
|
|
|
<Button type="button" icon="pi pi-search" />
|
|
|
|
</template>
|
|
|
|
</Paginator>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
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" :rowsPerPageOptions="[10, 20, 30]">
|
|
|
|
<template #start="slotProps">
|
|
|
|
Page: {{ slotProps.state.page }}
|
|
|
|
First: {{ slotProps.state.first }}
|
|
|
|
Rows: {{ slotProps.state.rows }}
|
|
|
|
</template>
|
|
|
|
<template #end>
|
|
|
|
<Button type="button" icon="pi pi-search" />
|
|
|
|
</template>
|
|
|
|
</Paginator>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script setup>
|
2023-10-15 09:38:39 +00:00
|
|
|
<\/script>
|
|
|
|
`
|
2023-02-28 08:29:30 +00:00
|
|
|
}
|
|
|
|
};
|
|
|
|
}
|
|
|
|
};
|
|
|
|
</script>
|