forked from verdnatura/salix-front
perf: remove local tree variable
This commit is contained in:
parent
f4807d887f
commit
3fded533a6
|
@ -99,14 +99,13 @@ watch(storeData, async (val) => {
|
|||
nodes.value[0].children = [...val];
|
||||
const fetchedNodeKeys = val.flatMap(getNodeIds);
|
||||
state.set('Tree', [...fetchedNodeKeys]);
|
||||
const tree = state.get('Tree');
|
||||
for (let n of tree) {
|
||||
for (let n of state.get('Tree')) {
|
||||
await fetchNodeLeaves(n);
|
||||
}
|
||||
expanded.value = [null, 1, ...fetchedNodeKeys];
|
||||
});
|
||||
|
||||
onMounted(async (n) => {
|
||||
onMounted(async () => {
|
||||
const tree = [...state.get('Tree'), 1];
|
||||
const lastStateTree = state.get('TreeState');
|
||||
if (tree) {
|
||||
|
|
Loading…
Reference in New Issue