mirror of
https://github.com/linux-odyssey/linux-odyssey.git
synced 2026-11-07 11:10:11 +08:00
feat: display tree by data
+ show discovered as highlight + BREAKING: cannot hightlight lines
This commit is contained in:
1 parent
9da4d4edaa
commit
45813ebbc0
2 files changed
+80
-54
No files matched your search
@@ -0,0 +1,21 @@
|
||||
<template>
|
||||
<a href="#" :class="nodeClass()">{{ node.discovered ? node.name : '???' }}</a>
|
||||
<ul :class="nodeClass()" v-if="node.children && node.children.length > 0">
|
||||
<li :class="nodeClass()" v-for="child in node.children" :key="child.path">
|
||||
<FileNode :node="child" />
|
||||
</li>
|
||||
</ul>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
const props = defineProps({
|
||||
node: {
|
||||
type: Object,
|
||||
required: true,
|
||||
},
|
||||
})
|
||||
|
||||
function nodeClass() {
|
||||
return props.node.discovered ? 'discovered' : ''
|
||||
}
|
||||
</script>
|
||||
Reference in new issue
Block a user