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

68 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-08-16 13:58:31 +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-08-16 13:58:31 +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>
<\/script>`,
2023-08-16 13:58:31 +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>
<\/script>`
}
};
}
};
</script>