wip fix component load
This commit is contained in:
parent
3d0cb712ed
commit
01d50df4e3
|
|
@ -109,6 +109,13 @@ export const treeRebuild = async (p: PG, arg?: { note?: string }) => {
|
||||||
for (const mitem of mitems) {
|
for (const mitem of mitems) {
|
||||||
const item = mitem.toJSON() as IItem;
|
const item = mitem.toJSON() as IItem;
|
||||||
if (item) {
|
if (item) {
|
||||||
|
await initLoadComp({ comps: p.comp.loaded, meta, mode: "page" }, item, {
|
||||||
|
async load(comp_ids) {
|
||||||
|
for (const id of comp_ids) {
|
||||||
|
await loadComponent(p, id);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
});
|
||||||
genMeta(
|
genMeta(
|
||||||
{
|
{
|
||||||
note: "tree-rebuild",
|
note: "tree-rebuild",
|
||||||
|
|
@ -122,12 +129,6 @@ export const treeRebuild = async (p: PG, arg?: { note?: string }) => {
|
||||||
pushTreeNode(p, m, meta, p.page.tree);
|
pushTreeNode(p, m, meta, p.page.tree);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m.item.component?.id) {
|
|
||||||
if (!p.comp.loaded[m.item.component.id]) {
|
|
||||||
loadComponent(p, m.item.component.id);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
assignMitem({
|
assignMitem({
|
||||||
m,
|
m,
|
||||||
root: item,
|
root: item,
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,7 @@ export const genMeta = (p: GenMetaP, arg: GenMetaArg) => {
|
||||||
p.meta[meta.item.id] = meta;
|
p.meta[meta.item.id] = meta;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (item.childs) {
|
if (item.childs) {
|
||||||
for (const [_, v] of Object.entries(item.childs)) {
|
for (const [_, v] of Object.entries(item.childs)) {
|
||||||
if (v.id) {
|
if (v.id) {
|
||||||
|
|
@ -57,7 +57,7 @@ export const genMeta = (p: GenMetaP, arg: GenMetaArg) => {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
genMeta(p, carg);
|
genMeta(p, carg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue