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

30 lines
762 B
Vue
Raw Normal View History

2024-09-19 07:02:49 +00:00
<template>
<DocSectionText v-bind="$attrs" />
<DocPTViewer :docs="docs">
<TreeSelect v-model="selectedValue" :options="nodes" selectionMode="checkbox" placeholder="Select Item" class="md:w-80 w-full" />
</DocPTViewer>
</template>
<script>
import { getPTOptions } from '@/components/doc/helpers';
import { NodeService } from '/service/NodeService';
export default {
data() {
return {
nodes: null,
selectedValue: null,
docs: [
{
data: getPTOptions('TreeSelect'),
key: 'TreeSelect'
}
]
};
},
mounted() {
NodeService.getTreeNodes().then((data) => (this.nodes = data));
}
};
</script>