From 454ebf0088f59e506a755404d85f26bb9c3a87b3 Mon Sep 17 00:00:00 2001 From: "Tomas \"Jethro\" Pokorny" Date: Mon, 21 Sep 2020 13:59:28 +0200 Subject: [PATCH] TreeNode editor | Rozbalovaci texty u temat --- vue_frontend/src/components/TreeNode.vue | 74 ++++++++++++++++++++---- 1 file changed, 62 insertions(+), 12 deletions(-) diff --git a/vue_frontend/src/components/TreeNode.vue b/vue_frontend/src/components/TreeNode.vue index 2c18a248..196f899d 100644 --- a/vue_frontend/src/components/TreeNode.vue +++ b/vue_frontend/src/components/TreeNode.vue @@ -1,8 +1,9 @@ @@ -64,11 +100,25 @@ export default { }, data: () => ({ debugShow: false, + showChildren: false, }), + computed: { + }, props: { item: Object, - visible: Boolean, - v_tematku: Boolean + force_visible: Boolean, + v_tematu: Boolean + }, + methods: { + hideNode: function(chld){ + if (this.showChildren || this.force_visible){ + return false; + } + if (chld.node.polymorphic_ctype.model === 'ulohazadaninode'){ + return false; + } + return true; + } } }