- your code only dealed with the first level of your folders, you should recursively revoke your tree components to deal with child folders. please refer to below article.
https://itnext.io/recursion-for-nested-tree-structure-components-in-vue-1cb600005475
- your code is using one param (isOpen) to toggle minimizing all folders, so if isOpen is false, all folders minimized; you should use item.isOpen to deal with different item;
treeData: {
name: "My Tree",
isOpen: true,
children: [
{ name: "hello" },
{ name: "wat" },
{
name: "child folder",
isOpen: false,
children: [
{
name: "child folder 1",
isOpen: false,
children: [{ name: "hello" }, { name: "wat" }]
},
{ name: "hello" },
{ name: "wat" },
{
name: "child folder 2",
isOpen: false,
children: [{ name: "hello" }, { name: "wat" }]
}
]
}
]
}
};