From 00925f65b32b8d251efbaa0e75da95937f5926dc Mon Sep 17 00:00:00 2001 From: tugcekucukoglu Date: Tue, 28 Nov 2023 12:23:46 +0300 Subject: [PATCH] Tree demo updates --- doc/tree/selection/CheckboxDoc.vue | 29 +++++++++++++++++++++++++++- doc/tree/selection/MultipleDoc.vue | 31 ++++++++++++++++++++++++++++-- doc/tree/selection/SingleDoc.vue | 29 +++++++++++++++++++++++++++- 3 files changed, 85 insertions(+), 4 deletions(-) diff --git a/doc/tree/selection/CheckboxDoc.vue b/doc/tree/selection/CheckboxDoc.vue index 3fc46fed2..bfe357017 100644 --- a/doc/tree/selection/CheckboxDoc.vue +++ b/doc/tree/selection/CheckboxDoc.vue @@ -84,7 +84,34 @@ const onNodeUnselect = (node) => { toast.add({ severity: 'success', summary: 'Node Unselected', detail: node.label, life: 3000 }); }; <\/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' }] + } + ] +}, +...` } }; }, diff --git a/doc/tree/selection/MultipleDoc.vue b/doc/tree/selection/MultipleDoc.vue index 9db11419a..81796b79e 100644 --- a/doc/tree/selection/MultipleDoc.vue +++ b/doc/tree/selection/MultipleDoc.vue @@ -27,7 +27,7 @@ export default { selectedKey: null, code: { basic: ` - `, options: ` @@ -81,7 +81,34 @@ onMounted(() => { NodeService.getTreeNodes().then((data) => (nodes.value = data)); }); <\/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' }] + } + ] +}, +...` } }; }, diff --git a/doc/tree/selection/SingleDoc.vue b/doc/tree/selection/SingleDoc.vue index ea6882236..8e40069f1 100644 --- a/doc/tree/selection/SingleDoc.vue +++ b/doc/tree/selection/SingleDoc.vue @@ -79,7 +79,34 @@ const onNodeUnselect = (node) => { toast.add({ severity: 'success', summary: 'Node Unselected', detail: node.label, life: 3000 }); }; <\/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' }] + } + ] +}, +...` } }; },