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

36 lines
1000 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
<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,
2024-09-20 12:22:44 +00:00
docs: [
2024-09-18 13:11:12 +00:00
{
data: getPTOptions('TreeTable'),
key: 'TreeTable'
},
{
data: getPTOptions('Column'),
key: 'Column'
}
]
};
},
mounted() {
NodeService.getTreeTableNodes().then((data) => (this.nodes = data));
}
};
</script>