mirror of
https://github.com/primefaces/primevue.git
synced 2025-05-10 01:12:37 +00:00
Merged new Docs and Demos
This commit is contained in:
parent
296cc217fb
commit
dfcc8ef4e7
1235 changed files with 130757 additions and 122640 deletions
72
doc/paginator/CustomContentDoc.vue
Normal file
72
doc/paginator/CustomContentDoc.vue
Normal file
|
@ -0,0 +1,72 @@
|
|||
<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: {
|
||||
basic: `
|
||||
<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>`,
|
||||
options: `
|
||||
<template>
|
||||
<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>
|
||||
<\/script>`,
|
||||
composition: `
|
||||
<template>
|
||||
<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>
|
||||
<\/script>`
|
||||
}
|
||||
};
|
||||
}
|
||||
};
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue