primevue-mirror/apps/showcase/doc/organizationchart/pt/PTViewer.vue

54 lines
1.4 KiB
Vue
Raw Normal View History

2024-09-19 06:53:36 +00:00
<template>
<DocPTViewer :docs="docs">
<OrganizationChart :value="data" collapsible>
<template #default="slotProps">
<span>{{ slotProps.node.label }}</span>
</template>
</OrganizationChart>
</DocPTViewer>
</template>
<script>
import { getPTOptions } from '@/components/doc/helpers';
export default {
data() {
return {
data: {
label: 'Argentina',
children: [
{
label: 'Argentina',
children: [
{
label: 'Argentina'
},
{
label: 'Croatia'
}
]
},
{
label: 'France',
children: [
{
label: 'France'
},
{
label: 'Morocco'
}
]
}
]
},
docs: [
{
data: getPTOptions('OrganizationChart'),
key: 'OrganizationChart'
}
]
};
}
};
</script>