diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 14:29:10 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 14:29:10 +0000 |
commit | 2aa4a82499d4becd2284cdb482213d541b8804dd (patch) | |
tree | b80bf8bf13c3766139fbacc530efd0dd9d54394c /gfx/wr/debugger/src/components/TreeView.vue | |
parent | Initial commit. (diff) | |
download | firefox-2aa4a82499d4becd2284cdb482213d541b8804dd.tar.xz firefox-2aa4a82499d4becd2284cdb482213d541b8804dd.zip |
Adding upstream version 86.0.1.upstream/86.0.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'gfx/wr/debugger/src/components/TreeView.vue')
-rw-r--r-- | gfx/wr/debugger/src/components/TreeView.vue | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/gfx/wr/debugger/src/components/TreeView.vue b/gfx/wr/debugger/src/components/TreeView.vue new file mode 100644 index 0000000000..bde473bda2 --- /dev/null +++ b/gfx/wr/debugger/src/components/TreeView.vue @@ -0,0 +1,40 @@ +<template> + <li> + <div v-on:click="toggle"> + <span v-if="isFolder">[{{open ? '-' : '+'}}]</span> + {{model.description}} + </div> + <ul style="padding-left: 1em; line-height: 1.5em;" v-show="open" v-if="isFolder"> + <treeview v-for="model in model.children" :model="model"></treeview> + </ul> + </li> +</template> + +<script> +export default { + name: 'treeview', + props: [ + 'model', + ], + data: function () { + return { + open: false + } + }, + computed: { + isFolder: function () { + return this.model.children && this.model.children.length + } + }, + methods: { + toggle: function () { + if (this.isFolder) { + this.open = !this.open + } + }, + }, +} +</script> + +<style> +</style> |