fix
This commit is contained in:
parent
822093253b
commit
2db41f543b
File diff suppressed because one or more lines are too long
|
|
@ -152,13 +152,16 @@ export const viEvalProps = (
|
||||||
|
|
||||||
if (typeof val === "function") {
|
if (typeof val === "function") {
|
||||||
script.props[name].fn = val;
|
script.props[name].fn = val;
|
||||||
val = new Function(
|
val = (...args: any[]) => {
|
||||||
`// [${meta.item.name}] ${name}: ${meta.item.id}
|
return meta.item.script?.props?.[name].fn(...args);
|
||||||
const { ${Object.keys(arg).join(", ")} } = this;
|
};
|
||||||
const fn = ${val.toString()}
|
// val = new Function(
|
||||||
return fn(...arguments);
|
// `// [${meta.item.name}] ${name}: ${meta.item.id}
|
||||||
`
|
// const { ${Object.keys(arg).join(", ")} } = this;
|
||||||
).bind(arg);
|
// const fn = ${val.toString()}
|
||||||
|
// return fn(...arguments);
|
||||||
|
// `
|
||||||
|
// ).bind(arg);
|
||||||
}
|
}
|
||||||
|
|
||||||
arg[name] = val;
|
arg[name] = val;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue