This commit is contained in:
Rizky 2024-03-30 14:51:09 +07:00
parent e10e0d8297
commit 0ae3e6b1a5
4 changed files with 4 additions and 1 deletions

File diff suppressed because one or more lines are too long

View File

@ -59,6 +59,7 @@ export const viEvalScript = (
...viScriptArg(vi), ...viScriptArg(vi),
...exports, ...exports,
...passprop, ...passprop,
_meta: vi.meta,
}; };
if (typeof passprop === "object") { if (typeof passprop === "object") {

View File

@ -50,6 +50,7 @@ export const createViPassProp = (
is_meta = false; is_meta = false;
} }
} }
if (is_meta) { if (is_meta) {
return children.map((item) => { return children.map((item) => {
let cmeta = vi.meta[item.id]; let cmeta = vi.meta[item.id];

View File

@ -9,6 +9,7 @@ export const baseTypings = `
const useEffect: typeof React.useEffect; const useEffect: typeof React.useEffect;
const useState: typeof React.useState; const useState: typeof React.useState;
const _meta: Record<string, IContent>;
const pathname: string; const pathname: string;
const isEditor: boolean; const isEditor: boolean;
const isLayout: boolean; const isLayout: boolean;