Save tree state
This commit is contained in:
8
template/app/composables/useTreeState.ts
Normal file
8
template/app/composables/useTreeState.ts
Normal file
@@ -0,0 +1,8 @@
|
||||
const collapsed = ref<Record<string, boolean>>({})
|
||||
|
||||
export function useTreeState() {
|
||||
function resetTree() {
|
||||
collapsed.value = {}
|
||||
}
|
||||
return { collapsed, resetTree }
|
||||
}
|
||||
Reference in New Issue
Block a user