Breadcrumb pt demo added
parent
d0c9e26cf4
commit
bd0152fdef
|
@ -0,0 +1,104 @@
|
|||
<template>
|
||||
<DocSectionText v-bind="$attrs"> </DocSectionText>
|
||||
<div class="card flex justify-content-center">
|
||||
<Breadcrumb
|
||||
:home="home"
|
||||
:model="items"
|
||||
:pt="{
|
||||
root: { class: 'surface-ground' },
|
||||
label: ({ props }) => ({
|
||||
class: props.index === items.length - 1 ? 'font-italic' : undefined
|
||||
})
|
||||
}"
|
||||
/>
|
||||
</div>
|
||||
<DocSectionCode :code="code" />
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
home: {
|
||||
icon: 'pi pi-home',
|
||||
to: '/'
|
||||
},
|
||||
items: [{ label: 'Computer' }, { label: 'Notebook' }, { label: 'Accessories' }, { label: 'Backpacks' }, { label: 'Item' }],
|
||||
code: {
|
||||
basic: `
|
||||
<Breadcrumb :home="home" :model="items"
|
||||
:pt="{
|
||||
root: { class: 'surface-ground' },
|
||||
label: ({ props }) => ({
|
||||
class: props.index === items.length - 1 ? 'font-italic' : undefined
|
||||
})
|
||||
}"
|
||||
/>`,
|
||||
options: `
|
||||
<template>
|
||||
<div class="card flex justify-content-center">
|
||||
<Breadcrumb :home="home" :model="items"
|
||||
:pt="{
|
||||
root: { class: 'surface-ground' },
|
||||
label: ({ props }) => ({
|
||||
class: props.index === items.length - 1 ? 'font-italic' : undefined
|
||||
})
|
||||
}"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
home: {
|
||||
icon: 'pi pi-home',
|
||||
to: '/',
|
||||
},
|
||||
items: [
|
||||
{label: 'Computer'},
|
||||
{label: 'Notebook'},
|
||||
{label: 'Accessories'},
|
||||
{label: 'Backpacks'},
|
||||
{label: 'Item'}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
<\/script>`,
|
||||
composition: `
|
||||
<template>
|
||||
<div class="card flex justify-content-center">
|
||||
<Breadcrumb :home="home" :model="items"
|
||||
:pt="{
|
||||
root: { class: 'surface-ground' },
|
||||
label: ({ props }) => ({
|
||||
class: props.index === items.length - 1 ? 'font-italic' : undefined
|
||||
})
|
||||
}"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref } from "vue";
|
||||
|
||||
const home = ref({
|
||||
icon: 'pi pi-home',
|
||||
to: '/',
|
||||
});
|
||||
|
||||
const items = ref([
|
||||
{label: 'Computer'},
|
||||
{label: 'Notebook'},
|
||||
{label: 'Accessories'},
|
||||
{label: 'Backpacks'},
|
||||
{label: 'Item'}
|
||||
]);
|
||||
<\/script>`
|
||||
}
|
||||
};
|
||||
}
|
||||
};
|
||||
</script>
|
|
@ -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>
|
|
@ -0,0 +1,41 @@
|
|||
<template>
|
||||
<div class="doc-main">
|
||||
<div class="doc-intro">
|
||||
<h1>Breadcrumb 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.breadcrumb',
|
||||
label: 'Breadcrumb PT Options',
|
||||
component: DocApiTable,
|
||||
data: getPTOption('Breadcrumb')
|
||||
},
|
||||
{
|
||||
id: 'pt.demo',
|
||||
label: 'Demo',
|
||||
component: PtDoc
|
||||
}
|
||||
]
|
||||
};
|
||||
}
|
||||
};
|
||||
</script>
|
|
@ -1,5 +1,5 @@
|
|||
<template>
|
||||
<DocComponent title="Vue Breadcrumb Component" header="Breadcrumb" description="Breadcrumb provides contextual information about page hierarchy." :componentDocs="docs" :apiDocs="['Breadcrumb', 'MenuItem']" />
|
||||
<DocComponent title="Vue Breadcrumb Component" header="Breadcrumb" description="Breadcrumb provides contextual information about page hierarchy." :componentDocs="docs" :apiDocs="['Breadcrumb', 'MenuItem']" :ptTabComponent="ptComponent" />
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
@ -8,6 +8,7 @@ import BasicDoc from '@/doc/breadcrumb/BasicDoc';
|
|||
import ImportDoc from '@/doc/breadcrumb/ImportDoc';
|
||||
import StyleDoc from '@/doc/breadcrumb/StyleDoc';
|
||||
import TemplateDoc from '@/doc/breadcrumb/TemplateDoc';
|
||||
import PTComponent from '@/doc/breadcrumb/pt/index.vue';
|
||||
|
||||
export default {
|
||||
data() {
|
||||
|
@ -38,7 +39,8 @@ export default {
|
|||
label: 'Accessibility',
|
||||
component: AccessibilityDoc
|
||||
}
|
||||
]
|
||||
],
|
||||
ptComponent: PTComponent
|
||||
};
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue