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

37 lines
1.0 KiB
Vue
Raw Normal View History

2024-09-18 13:11:12 +00:00
<template>
<DocSectionText v-bind="$attrs" />
<DocPTViewer :docs="ptViewerDoc">
<TreeTable :value="nodes" tableStyle="min-width: 50rem">
<Column field="name" header="Name" expander style="width: 34%"></Column>
<Column field="size" header="Size" style="width: 33%"></Column>
<Column field="type" header="Type" style="width: 33%"></Column>
</TreeTable>
</DocPTViewer>
</template>
<script>
import { getPTOptions } from '@/components/doc/helpers';
import { NodeService } from '@/service/NodeService';
export default {
data() {
return {
nodes: null,
ptViewerDoc: [
{
data: getPTOptions('TreeTable'),
key: 'TreeTable'
},
{
data: getPTOptions('Column'),
key: 'Column'
}
]
};
},
mounted() {
NodeService.getTreeTableNodes().then((data) => (this.nodes = data));
}
};
</script>