TreeTable pt demo added
parent
885047c341
commit
e3c621b6ca
|
@ -0,0 +1,196 @@
|
||||||
|
<template>
|
||||||
|
<DocSectionText v-bind="$attrs"></DocSectionText>
|
||||||
|
<div class="card">
|
||||||
|
<TreeTable :value="nodes" sortMode="multiple">
|
||||||
|
<Column
|
||||||
|
field="name"
|
||||||
|
header="Name"
|
||||||
|
sortable
|
||||||
|
expander
|
||||||
|
:pt="{
|
||||||
|
sortBadge: { class: 'text-orange-400' }
|
||||||
|
}"
|
||||||
|
/>
|
||||||
|
<Column
|
||||||
|
field="size"
|
||||||
|
header="Size"
|
||||||
|
sortable
|
||||||
|
:pt="{
|
||||||
|
sortBadge: { class: 'text-orange-400' }
|
||||||
|
}"
|
||||||
|
/>
|
||||||
|
<Column
|
||||||
|
field="type"
|
||||||
|
header="Type"
|
||||||
|
sortable
|
||||||
|
:pt="{
|
||||||
|
sortBadge: { class: 'text-orange-400' }
|
||||||
|
}"
|
||||||
|
/>
|
||||||
|
</TreeTable>
|
||||||
|
</div>
|
||||||
|
<DocSectionCode :code="code" :service="['NodeService']" />
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { NodeService } from '@/service/NodeService';
|
||||||
|
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
nodes: null,
|
||||||
|
code: {
|
||||||
|
basic: `
|
||||||
|
<TreeTable :value="nodes" sortMode="multiple">
|
||||||
|
<Column
|
||||||
|
field="name"
|
||||||
|
header="Name"
|
||||||
|
sortable
|
||||||
|
expander
|
||||||
|
:pt="{
|
||||||
|
sortBadge: { class: 'text-orange-400' }
|
||||||
|
}"
|
||||||
|
/>
|
||||||
|
<Column
|
||||||
|
field="size"
|
||||||
|
header="Size"
|
||||||
|
sortable
|
||||||
|
:pt="{
|
||||||
|
sortBadge: { class: 'text-orange-400' }
|
||||||
|
}"
|
||||||
|
/>
|
||||||
|
<Column
|
||||||
|
field="type"
|
||||||
|
header="Type"
|
||||||
|
sortable
|
||||||
|
:pt="{
|
||||||
|
sortBadge: { class: 'text-orange-400' }
|
||||||
|
}"
|
||||||
|
/>
|
||||||
|
</TreeTable>`,
|
||||||
|
options: `
|
||||||
|
<template>
|
||||||
|
<div class="card">
|
||||||
|
<TreeTable :value="nodes" sortMode="multiple">
|
||||||
|
<Column
|
||||||
|
field="name"
|
||||||
|
header="Name"
|
||||||
|
sortable
|
||||||
|
expander
|
||||||
|
:pt="{
|
||||||
|
sortBadge: { class: 'text-orange-400' }
|
||||||
|
}"
|
||||||
|
/>
|
||||||
|
<Column
|
||||||
|
field="size"
|
||||||
|
header="Size"
|
||||||
|
sortable
|
||||||
|
:pt="{
|
||||||
|
sortBadge: { class: 'text-orange-400' }
|
||||||
|
}"
|
||||||
|
/>
|
||||||
|
<Column
|
||||||
|
field="type"
|
||||||
|
header="Type"
|
||||||
|
sortable
|
||||||
|
:pt="{
|
||||||
|
sortBadge: { class: 'text-orange-400' }
|
||||||
|
}"
|
||||||
|
/>
|
||||||
|
</TreeTable>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { NodeService } from '@/service/NodeService';
|
||||||
|
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
nodes: null,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
NodeService.getTreeTableNodes().then((data) => (this.nodes = data));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
<\/script>`,
|
||||||
|
composition: `
|
||||||
|
<template>
|
||||||
|
<div class="card">
|
||||||
|
<TreeTable :value="nodes" sortMode="multiple">
|
||||||
|
<Column
|
||||||
|
field="name"
|
||||||
|
header="Name"
|
||||||
|
sortable
|
||||||
|
expander
|
||||||
|
:pt="{
|
||||||
|
sortBadge: { class: 'text-orange-400' }
|
||||||
|
}"
|
||||||
|
/>
|
||||||
|
<Column
|
||||||
|
field="size"
|
||||||
|
header="Size"
|
||||||
|
sortable
|
||||||
|
:pt="{
|
||||||
|
sortBadge: { class: 'text-orange-400' }
|
||||||
|
}"
|
||||||
|
/>
|
||||||
|
<Column
|
||||||
|
field="type"
|
||||||
|
header="Type"
|
||||||
|
sortable
|
||||||
|
:pt="{
|
||||||
|
sortBadge: { class: 'text-orange-400' }
|
||||||
|
}"
|
||||||
|
/>
|
||||||
|
</TreeTable>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import { ref, onMounted } from 'vue';
|
||||||
|
import { NodeService } from '@/service/NodeService';
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
NodeService.getTreeTableNodes().then((data) => (nodes.value = data));
|
||||||
|
});
|
||||||
|
|
||||||
|
const nodes = ref();
|
||||||
|
<\/script>`,
|
||||||
|
data: `
|
||||||
|
{
|
||||||
|
key: '0',
|
||||||
|
label: 'Documents',
|
||||||
|
data: 'Documents Folder',
|
||||||
|
icon: 'pi pi-fw pi-inbox',
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
key: '0-0',
|
||||||
|
label: 'Work',
|
||||||
|
data: 'Work Folder',
|
||||||
|
icon: 'pi pi-fw pi-cog',
|
||||||
|
children: [
|
||||||
|
{ key: '0-0-0', label: 'Expenses.doc', icon: 'pi pi-fw pi-file', data: 'Expenses Document' },
|
||||||
|
{ key: '0-0-1', label: 'Resume.doc', icon: 'pi pi-fw pi-file', data: 'Resume Document' }
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: '0-1',
|
||||||
|
label: 'Home',
|
||||||
|
data: 'Home Folder',
|
||||||
|
icon: 'pi pi-fw pi-home',
|
||||||
|
children: [{ key: '0-1-0', label: 'Invoices.txt', icon: 'pi pi-fw pi-file', data: 'Invoices for this month' }]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
...
|
||||||
|
`
|
||||||
|
}
|
||||||
|
};
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
NodeService.getTreeTableNodes().then((data) => (this.nodes = data));
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
|
@ -0,0 +1,8 @@
|
||||||
|
<template>
|
||||||
|
<DocSectionText v-bind="$attrs">
|
||||||
|
<p>{{ $attrs.description }}</p>
|
||||||
|
</DocSectionText>
|
||||||
|
<div class="card">
|
||||||
|
<img class="w-full" src="https://primefaces.org/cdn/primevue/images/pt/wireframe-placeholder.jpg" />
|
||||||
|
</div>
|
||||||
|
</template>
|
|
@ -0,0 +1,47 @@
|
||||||
|
<template>
|
||||||
|
<div class="doc-main">
|
||||||
|
<div class="doc-intro">
|
||||||
|
<h1>TreeTable Pass Through</h1>
|
||||||
|
</div>
|
||||||
|
<DocSections :docs="docs" />
|
||||||
|
</div>
|
||||||
|
<DocSectionNav :docs="docs" />
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import DocApiTable from '@/components/doc/DocApiTable.vue';
|
||||||
|
import { getPTOption } from '@/components/doc/helpers/PTHelper.js';
|
||||||
|
import PtDoc from './PTDoc.vue';
|
||||||
|
import PTImage from './PTImage.vue';
|
||||||
|
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
docs: [
|
||||||
|
{
|
||||||
|
id: 'pt.image',
|
||||||
|
label: 'Wireframe',
|
||||||
|
component: PTImage
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 'pt.doc.treetable',
|
||||||
|
label: 'TreeTable PT Options',
|
||||||
|
component: DocApiTable,
|
||||||
|
data: getPTOption('TreeTable')
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 'pt.doc.column',
|
||||||
|
label: 'Column PT Options',
|
||||||
|
component: DocApiTable,
|
||||||
|
data: getPTOption('Column')
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 'pt.demo',
|
||||||
|
label: 'Demo',
|
||||||
|
component: PtDoc
|
||||||
|
}
|
||||||
|
]
|
||||||
|
};
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
|
@ -1,5 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<DocComponent title="Vue TreeTable Component" header="TreeTable" description="TreeTable is used to display hierarchical data in tabular format." :componentDocs="docs" :apiDocs="['TreeTable', 'Column']" />
|
<DocComponent title="Vue TreeTable Component" header="TreeTable" description="TreeTable is used to display hierarchical data in tabular format." :componentDocs="docs" :apiDocs="['TreeTable', 'Column']" :ptTabComponent="ptComponent" />
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
@ -11,11 +11,15 @@ import DynamicColumnsDoc from '@/doc/treetable/DynamicColumnsDoc';
|
||||||
import FilterDoc from '@/doc/treetable/FilterDoc';
|
import FilterDoc from '@/doc/treetable/FilterDoc';
|
||||||
import ImportDoc from '@/doc/treetable/ImportDoc';
|
import ImportDoc from '@/doc/treetable/ImportDoc';
|
||||||
import LazyLoadDoc from '@/doc/treetable/LazyLoadDoc';
|
import LazyLoadDoc from '@/doc/treetable/LazyLoadDoc';
|
||||||
|
import ResponsiveDoc from '@/doc/treetable/ResponsiveDoc';
|
||||||
|
import SizeDoc from '@/doc/treetable/SizeDoc';
|
||||||
|
import StyleDoc from '@/doc/treetable/StyleDoc';
|
||||||
|
import TemplateDoc from '@/doc/treetable/TemplateDoc';
|
||||||
import PaginatorBasicDoc from '@/doc/treetable/paginator/PaginatorBasicDoc';
|
import PaginatorBasicDoc from '@/doc/treetable/paginator/PaginatorBasicDoc';
|
||||||
import PaginatorTemplateDoc from '@/doc/treetable/paginator/PaginatorTemplateDoc';
|
import PaginatorTemplateDoc from '@/doc/treetable/paginator/PaginatorTemplateDoc';
|
||||||
|
import PTComponent from '@/doc/treetable/pt/index.vue';
|
||||||
import ExpandModeDoc from '@/doc/treetable/resize/ExpandModeDoc';
|
import ExpandModeDoc from '@/doc/treetable/resize/ExpandModeDoc';
|
||||||
import FitModeDoc from '@/doc/treetable/resize/FitModeDoc';
|
import FitModeDoc from '@/doc/treetable/resize/FitModeDoc';
|
||||||
import ResponsiveDoc from '@/doc/treetable/ResponsiveDoc';
|
|
||||||
import FlexibleScrollDoc from '@/doc/treetable/scroll/FlexibleScrollDoc';
|
import FlexibleScrollDoc from '@/doc/treetable/scroll/FlexibleScrollDoc';
|
||||||
import FrozenColumnsDoc from '@/doc/treetable/scroll/FrozenColumnsDoc';
|
import FrozenColumnsDoc from '@/doc/treetable/scroll/FrozenColumnsDoc';
|
||||||
import HorizontalScrollDoc from '@/doc/treetable/scroll/HorizontalScrollDoc';
|
import HorizontalScrollDoc from '@/doc/treetable/scroll/HorizontalScrollDoc';
|
||||||
|
@ -24,12 +28,9 @@ import CheckboxRowSelectionDoc from '@/doc/treetable/selection/CheckboxRowSelect
|
||||||
import MultipleRowsSelectionDoc from '@/doc/treetable/selection/MultipleRowsSelectionDoc';
|
import MultipleRowsSelectionDoc from '@/doc/treetable/selection/MultipleRowsSelectionDoc';
|
||||||
import RowSelectionEventsDoc from '@/doc/treetable/selection/RowSelectionEventsDoc';
|
import RowSelectionEventsDoc from '@/doc/treetable/selection/RowSelectionEventsDoc';
|
||||||
import SingleRowSelectionDoc from '@/doc/treetable/selection/SingleRowSelectionDoc';
|
import SingleRowSelectionDoc from '@/doc/treetable/selection/SingleRowSelectionDoc';
|
||||||
import SizeDoc from '@/doc/treetable/SizeDoc';
|
|
||||||
import MultipleColumnsDoc from '@/doc/treetable/sort/MultipleColumnsDoc';
|
import MultipleColumnsDoc from '@/doc/treetable/sort/MultipleColumnsDoc';
|
||||||
import RemovableSortDoc from '@/doc/treetable/sort/RemovableSortDoc';
|
import RemovableSortDoc from '@/doc/treetable/sort/RemovableSortDoc';
|
||||||
import SingleColumnDoc from '@/doc/treetable/sort/SingleColumnDoc';
|
import SingleColumnDoc from '@/doc/treetable/sort/SingleColumnDoc';
|
||||||
import StyleDoc from '@/doc/treetable/StyleDoc';
|
|
||||||
import TemplateDoc from '@/doc/treetable/TemplateDoc';
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
|
@ -200,7 +201,8 @@ export default {
|
||||||
label: 'Accessibility',
|
label: 'Accessibility',
|
||||||
component: AccessibilityDoc
|
component: AccessibilityDoc
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
ptComponent: PTComponent
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue