This commit is contained in:
Rizky 2024-03-18 01:34:05 +07:00
parent 70a237e7af
commit 32f35b4c63
4 changed files with 39 additions and 28 deletions

File diff suppressed because one or more lines are too long

View File

@ -55,7 +55,8 @@ const scanSingle = (
pending[comp_id].push(item);
}
if (comp.list[comp_id] && pending[comp_id]) {
if (pending[comp_id]) {
if (comp.list[comp_id]) {
for (const item of pending[comp_id]) {
for (const prop of Object.values(item.component?.props || {})) {
if (prop.content) {
@ -64,6 +65,13 @@ const scanSingle = (
}
}
delete pending[comp_id];
} else if (item.component?.props) {
for (const prop of Object.values(item.component?.props || {})) {
if (prop.content) {
scanSingle(prop.content, pending);
}
}
}
}
}
}

View File

@ -38,6 +38,7 @@ export const initBaseRoute = async () => {
base.layout.meta = {};
if (base.layout.root) {
await scanComponent(base.layout.root.childs);
console.log(Object.values(base.comp.list).map((e) => e.name));
rebuildMeta(base.layout.meta, base.layout.root);
}
}

View File

@ -82,7 +82,9 @@ export const createViPassProp = (
}
}
return modifyChild(arg, { ...meta.script?.scope, ...passprop });
const result = modifyChild(arg, meta.script?.scope);
return result;
};
};