show subtree variable

This commit is contained in:
codetypes committed 2025-03-20 13:34:08 +08:00
1 parent 8199a0d24e
commit 35ca8285d0
2 files changed
+62 -15

No files matched your search

+2 -4
View File
@@ -131,7 +131,7 @@ export type EditTree = {
group: string[];
import: ImportDef[];
declvar: VarDef[];
subtree: VarDef[];
subtree: ImportDef[];
root: TreeGraphData;
};
@@ -699,9 +699,7 @@ export const useWorkspace = create<WorkspaceStore>((set, get) => ({
root: editor.root,
import: editor.declare.import,
declvar: editor.declare.declvar,
subtree: editor.declare.subtree
.map((def) => def.vars)
.reduce((acc, v) => [...acc, ...v], []),
subtree: editor.declare.subtree,
},
editingNodeDef: null,
editingNode: null,