fix
This commit is contained in:
parent
51361d0280
commit
1125dfd081
|
|
@ -73,7 +73,6 @@ export const LRenderInternal: FC<{
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
if (!meta) {
|
if (!meta) {
|
||||||
console.log("meta not found", id);
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
meta.render = () => {
|
meta.render = () => {
|
||||||
|
|
|
||||||
|
|
@ -26,6 +26,8 @@ export const treePropEval = (
|
||||||
|
|
||||||
const w = window as any;
|
const w = window as any;
|
||||||
const finalScope = mergeScopeUpwards(p, id, { _scopeIndex });
|
const finalScope = mergeScopeUpwards(p, id, { _scopeIndex });
|
||||||
|
|
||||||
|
|
||||||
const args = {
|
const args = {
|
||||||
...w.exports,
|
...w.exports,
|
||||||
...finalScope,
|
...finalScope,
|
||||||
|
|
|
||||||
|
|
@ -47,9 +47,14 @@ export const treeScopeEval = (
|
||||||
|
|
||||||
for (const [k, v] of Object.entries(finalScope)) {
|
for (const [k, v] of Object.entries(finalScope)) {
|
||||||
if (v && typeof v === "object") {
|
if (v && typeof v === "object") {
|
||||||
const t: { _jsx: true; Comp: FC<{ parent_id: string }> } = v as any;
|
const t: {
|
||||||
|
_jsx: true;
|
||||||
|
Comp: FC<{ parent_id: string; _scopeIndex?: Record<string, any> }>;
|
||||||
|
} = v as any;
|
||||||
if (t._jsx && t.Comp) {
|
if (t._jsx && t.Comp) {
|
||||||
finalScope[k] = <t.Comp parent_id={meta.item.id} />;
|
finalScope[k] = (
|
||||||
|
<t.Comp parent_id={meta.item.id} _scopeIndex={_scopeIndex} />
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue