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

29 lines
733 B
Vue

<template>
<DocPTViewer :docs="docs">
<TreeSelect v-model="selectedValue" :options="nodes" selectionMode="checkbox" showClear 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>