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

29 lines
733 B
Vue
Raw Normal View History

2024-09-19 07:02:49 +00:00
<template>
<DocPTViewer :docs="docs">
2024-11-11 06:45:54 +00:00
<TreeSelect v-model="selectedValue" :options="nodes" selectionMode="checkbox" showClear placeholder="Select Item" class="md:w-80 w-full" />
2024-09-19 07:02:49 +00:00
</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>