Paginator pt demo added

pull/3938/head
Tuğçe Küçükoğlu 2023-05-08 12:37:06 +03:00
parent 2adeccc240
commit 633ee73228
4 changed files with 125 additions and 4 deletions

View File

@ -0,0 +1,70 @@
<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: {
basic: `
<Paginator
:rows="10"
:totalRecords="120"
:pt="{
pageButton: ({ props, state, context }) => ({
class: context.active ? 'bg-primary' : undefined
})
}"
/>`,
options: `
<template>
<div class="card">
<Paginator
:rows="10"
:totalRecords="120"
:pt="{
pageButton: ({ props, state, context }) => ({
class: context.active ? 'bg-primary' : undefined
})
}"
/>
</div>
</template>
<script>
<\/script>`,
composition: `
<template>
<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>

View File

@ -0,0 +1,8 @@
<template>
<DocSectionText v-bind="$attrs">
<p>{{ $attrs.description }}</p>
</DocSectionText>
<div class="card">
<img class="w-full" src="https://primefaces.org/cdn/primevue/images/pt/wireframe-placeholder.jpg" />
</div>
</template>

View File

@ -0,0 +1,41 @@
<template>
<div class="doc-main">
<div class="doc-intro">
<h1>Paginator Pass Through</h1>
</div>
<DocSections :docs="docs" />
</div>
<DocSectionNav :docs="docs" />
</template>
<script>
import DocApiTable from '@/components/doc/DocApiTable.vue';
import { getPTOption } from '@/components/doc/helpers/PTHelper.js';
import PtDoc from './PTDoc.vue';
import PTImage from './PTImage.vue';
export default {
data() {
return {
docs: [
{
id: 'pt.image',
label: 'Wireframe',
component: PTImage
},
{
id: 'pt.doc.paginator',
label: 'Paginator PT Options',
component: DocApiTable,
data: getPTOption('Paginator')
},
{
id: 'pt.demo',
label: 'Demo',
component: PtDoc
}
]
};
}
};
</script>

View File

@ -1,16 +1,17 @@
<template> <template>
<DocComponent title="Vue Paginator Component" header="Paginator" description="Paginator displays data in paged format and provides navigation between pages." :componentDocs="docs" :apiDocs="['Paginator']" /> <DocComponent title="Vue Paginator Component" header="Paginator" description="Paginator displays data in paged format and provides navigation between pages." :componentDocs="docs" :apiDocs="['Paginator']" :ptTabComponent="ptComponent" />
</template> </template>
<script> <script>
import AccessibilityDoc from '@/doc/paginator/AccessibilityDoc.vue'; import AccessibilityDoc from '@/doc/paginator/AccessibilityDoc.vue';
import BasicDoc from '@/doc/paginator/BasicDoc.vue'; import BasicDoc from '@/doc/paginator/BasicDoc.vue';
import CurrentPageReportDoc from '@/doc/paginator/CurrentPageReportDoc.vue';
import CustomContentDoc from '@/doc/paginator/CustomContentDoc.vue';
import ImportDoc from '@/doc/paginator/ImportDoc.vue'; import ImportDoc from '@/doc/paginator/ImportDoc.vue';
import ResponsiveDoc from '@/doc/paginator/ResponsiveDoc.vue'; import ResponsiveDoc from '@/doc/paginator/ResponsiveDoc.vue';
import StyleDoc from '@/doc/paginator/StyleDoc.vue'; import StyleDoc from '@/doc/paginator/StyleDoc.vue';
import TemplateDoc from '@/doc/paginator/TemplateDoc.vue'; import TemplateDoc from '@/doc/paginator/TemplateDoc.vue';
import CurrentPageReportDoc from '../../doc/paginator/CurrentPageReportDoc.vue'; import PTComponent from '@/doc/paginator/pt/index.vue';
import CustomContentDoc from '../../doc/paginator/CustomContentDoc.vue';
export default { export default {
data() { data() {
@ -56,7 +57,8 @@ export default {
label: 'Accessibility', label: 'Accessibility',
component: AccessibilityDoc component: AccessibilityDoc
} }
] ],
ptComponent: PTComponent
}; };
} }
}; };