wip fix
This commit is contained in:
parent
ad5be856a3
commit
e5dc268807
File diff suppressed because one or more lines are too long
|
|
@ -41,6 +41,7 @@ export const viEvalProps = (
|
||||||
meta.item.script.props = {};
|
meta.item.script.props = {};
|
||||||
let fails = new Set<string>();
|
let fails = new Set<string>();
|
||||||
if (!!meta.item.component.props) {
|
if (!!meta.item.component.props) {
|
||||||
|
const _props: any = {};
|
||||||
for (const [name, prop] of Object.entries(meta.item.component.props)) {
|
for (const [name, prop] of Object.entries(meta.item.component.props)) {
|
||||||
try {
|
try {
|
||||||
if (prop.meta?.type === "content-element") {
|
if (prop.meta?.type === "content-element") {
|
||||||
|
|
@ -141,6 +142,7 @@ export const viEvalProps = (
|
||||||
}
|
}
|
||||||
|
|
||||||
arg[name] = val;
|
arg[name] = val;
|
||||||
|
_props[name] = val;
|
||||||
|
|
||||||
if (passprop) {
|
if (passprop) {
|
||||||
passprop[name] = val;
|
passprop[name] = val;
|
||||||
|
|
@ -172,11 +174,13 @@ export const viEvalProps = (
|
||||||
}
|
}
|
||||||
|
|
||||||
if (found) {
|
if (found) {
|
||||||
|
const curprops = { ...passprop, _props };
|
||||||
|
|
||||||
const fn = new Function(
|
const fn = new Function(
|
||||||
...Object.keys(passprop),
|
...Object.keys(curprops),
|
||||||
`return ${btn.src}`
|
`return ${btn.src}`
|
||||||
);
|
);
|
||||||
btn.local.value = fn(...Object.values(passprop));
|
btn.local.value = fn(...Object.values(curprops));
|
||||||
setTimeout(btn.local.render, 300);
|
setTimeout(btn.local.render, 300);
|
||||||
setTimeout(btn.local.render, 1000);
|
setTimeout(btn.local.render, 1000);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue