primevue-mirror/doc/paginator/pt/PTDoc.vue

74 lines
1.5 KiB
Vue
Raw Normal View History

2023-05-08 09:37:06 +00:00
<template>
<DocSectionText v-bind="$attrs"></DocSectionText>
<div class="card">
<Paginator
:rows="10"
:totalRecords="120"
:pt="{
pageButton: ({ props, state, context }) => ({
class: context.active ? 'bg-primary' : undefined
})
}"
/>
</div>
<DocSectionCode :code="code" />
</template>
<script>
export default {
data() {
return {
code: {
2023-09-22 12:54:14 +00:00
basic: `
<Paginator
2023-05-08 09:37:06 +00:00
:rows="10"
:totalRecords="120"
:pt="{
pageButton: ({ props, state, context }) => ({
class: context.active ? 'bg-primary' : undefined
})
}"
2023-10-15 09:38:39 +00:00
/>
`,
2023-09-22 12:54:14 +00:00
options: `
<template>
2023-05-08 09:37:06 +00:00
<div class="card">
<Paginator
:rows="10"
:totalRecords="120"
:pt="{
pageButton: ({ props, state, context }) => ({
class: context.active ? 'bg-primary' : undefined
})
}"
/>
</div>
</template>
<script>
2023-10-15 09:38:39 +00:00
<\/script>
`,
2023-09-22 12:54:14 +00:00
composition: `
<template>
2023-05-08 09:37:06 +00:00
<div class="card">
<Paginator
:rows="10"
:totalRecords="120"
:pt="{
pageButton: ({ props, state, context }) => ({
class: context.active ? 'bg-primary' : undefined
})
}"
/>
</div>
</template>
<script setup>
2023-10-15 09:38:39 +00:00
<\/script>
`
2023-05-08 09:37:06 +00:00
}
};
}
};
</script>