2023-02-28 08:29:30 +00:00
|
|
|
<template>
|
|
|
|
<DocSectionText v-bind="$attrs">
|
|
|
|
<p>OrganizationChart requires a collection of <i>TreeNode</i> instances as a <i>value</i>.</p>
|
|
|
|
</DocSectionText>
|
|
|
|
<div class="card overflow-x-auto">
|
|
|
|
<OrganizationChart :value="data">
|
|
|
|
<template #default="slotProps">
|
|
|
|
<span>{{ slotProps.node.label }}</span>
|
|
|
|
</template>
|
|
|
|
</OrganizationChart>
|
|
|
|
</div>
|
|
|
|
<DocSectionCode :code="code" />
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
export default {
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
data: {
|
|
|
|
label: 'Argentina',
|
|
|
|
children: [
|
|
|
|
{
|
|
|
|
label: 'Argentina',
|
|
|
|
children: [
|
|
|
|
{
|
|
|
|
label: 'Argentina'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: 'Croatia'
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: 'France',
|
|
|
|
children: [
|
|
|
|
{
|
|
|
|
label: 'France'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: 'Morocco'
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
code: {
|
2023-09-22 12:54:14 +00:00
|
|
|
basic: `
|
|
|
|
<OrganizationChart :value="data">
|
2023-02-28 08:29:30 +00:00
|
|
|
<template #default="slotProps">
|
|
|
|
<span>{{ slotProps.node.label }}</span>
|
|
|
|
</template>
|
2023-10-15 09:38:39 +00:00
|
|
|
</OrganizationChart>
|
|
|
|
`,
|
2023-09-22 12:54:14 +00:00
|
|
|
options: `
|
|
|
|
<template>
|
2023-02-28 08:29:30 +00:00
|
|
|
<div class="card overflow-x-auto">
|
|
|
|
<OrganizationChart :value="data">
|
|
|
|
<template #default="slotProps">
|
|
|
|
<span>{{ slotProps.node.label }}</span>
|
|
|
|
</template>
|
|
|
|
</OrganizationChart>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
export default {
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
data: {
|
|
|
|
label: 'Argentina',
|
|
|
|
children: [
|
|
|
|
{
|
|
|
|
label: 'Argentina',
|
|
|
|
children: [
|
|
|
|
{
|
|
|
|
label: 'Argentina'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: 'Croatia'
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: 'France',
|
|
|
|
children: [
|
|
|
|
{
|
|
|
|
label: 'France'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: 'Morocco'
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
};
|
|
|
|
}
|
|
|
|
};
|
2023-10-15 09:38:39 +00:00
|
|
|
<\/script>
|
|
|
|
`,
|
2023-09-22 12:54:14 +00:00
|
|
|
composition: `
|
|
|
|
<template>
|
2023-02-28 08:29:30 +00:00
|
|
|
<div class="card overflow-x-auto">
|
|
|
|
<OrganizationChart :value="data">
|
|
|
|
<template #default="slotProps">
|
|
|
|
<span>{{ slotProps.node.label }}</span>
|
|
|
|
</template>
|
|
|
|
</OrganizationChart>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script setup>
|
|
|
|
import { ref } from "vue";
|
|
|
|
|
|
|
|
const data = ref({
|
|
|
|
label: 'Argentina',
|
|
|
|
children: [
|
|
|
|
{
|
|
|
|
label: 'Argentina',
|
|
|
|
children: [
|
|
|
|
{
|
|
|
|
label: 'Argentina'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: 'Croatia'
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: 'France',
|
|
|
|
children: [
|
|
|
|
{
|
|
|
|
label: 'France'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: 'Morocco'
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
]
|
|
|
|
});
|
2023-10-15 09:38:39 +00:00
|
|
|
<\/script>
|
|
|
|
`
|
2023-02-28 08:29:30 +00:00
|
|
|
}
|
|
|
|
};
|
|
|
|
}
|
|
|
|
};
|
|
|
|
</script>
|