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

29 lines
705 B
Vue
Raw Normal View History

2024-09-18 13:11:12 +00:00
<template>
2024-09-20 12:22:44 +00:00
<DocPTViewer :docs="docs">
2024-09-18 13:11:12 +00:00
<Tree v-model:selectionKeys="selectedKey" filter :value="nodes" selectionMode="checkbox" class="w-full md:w-[30rem]"></Tree>
</DocPTViewer>
</template>
<script>
import { getPTOptions } from '@/components/doc/helpers';
import { NodeService } from '@/service/NodeService';
export default {
data() {
return {
nodes: null,
selectedKey: null,
2024-09-20 12:22:44 +00:00
docs: [
2024-09-18 13:11:12 +00:00
{
data: getPTOptions('Tree'),
key: 'Tree'
}
]
};
},
mounted() {
NodeService.getTreeNodes().then((data) => (this.nodes = data));
}
};
</script>