This commit is contained in:
Rizky 2024-03-18 00:17:33 +07:00
parent df04e264fe
commit bb3aff33b1
2 changed files with 26 additions and 49 deletions

File diff suppressed because one or more lines are too long

View File

@ -82,30 +82,7 @@ export const createViPassProp = (
const meta = vi.meta[child_id];
return <ViRender is_layout={is_layout} meta={meta} />;
}
} else if (Array.isArray(arg.children)) {
let is_meta = true;
for (const c of arg.children) {
if (!(!isValidElement(c) && typeof c === "object")) {
is_meta = false;
}
}
if (is_meta) {
return arg.children.map((item) => {
if (item && item.id) {
const meta = vi.meta[item.id];
return (
<ViRender
key={item.id}
is_layout={is_layout}
meta={meta}
passprop={_pass}
/>
);
}
return null;
});
}
}
}
return modifyChild(arg, meta.script?.scope);
};