Open
Description
<script setup lang="ts">
interface TreeData {
key: string;
title: string;
children: TreeData[];
}
const { data } = defineProps<{ data: TreeData[] }>();
</script>
<template>
<ul>
<li v-for="t in data" :key="t.key">
{{ t.title }}
<TreeComponent
v-if="t.children && t.children.length > 0"
:data="t.children"
/>
</li>
</ul>
</template>