refactor:(04) use TreeCompoent

This commit is contained in:
Net 2024-07-30 16:24:11 +07:00
parent b538356751
commit ac171b1379
2 changed files with 117 additions and 12 deletions

View file

@ -1,15 +1,8 @@
<script setup lang="ts">
import { BranchWithChildren } from 'stores/branch/types';
const nodes = defineModel<
(
| {
id: string;
name: string;
children: [];
}
| BranchWithChildren
)[]
>('nodes', { default: [] });
const nodes = defineModel<(any | BranchWithChildren)[]>('nodes', {
default: [],
});
const expandedTree = defineModel<string[]>('expandedTree', { default: [] });