fix
This commit is contained in:
parent
162bb69908
commit
03b97dac9a
File diff suppressed because one or more lines are too long
|
|
@ -152,6 +152,12 @@ export const viEvalProps = (
|
||||||
let val = fn(...Object.values(arg));
|
let val = fn(...Object.values(arg));
|
||||||
|
|
||||||
if (typeof val === "function") {
|
if (typeof val === "function") {
|
||||||
|
if (w.isEditor) {
|
||||||
|
script.props[name].fn = val;
|
||||||
|
val = (...args: any[]) => {
|
||||||
|
if (script) return script.props?.[name].fn(...args);
|
||||||
|
};
|
||||||
|
} else {
|
||||||
val = (...args: any[]) => {
|
val = (...args: any[]) => {
|
||||||
const definer = new Function(
|
const definer = new Function(
|
||||||
...Object.keys(arg),
|
...Object.keys(arg),
|
||||||
|
|
@ -164,6 +170,7 @@ export const viEvalProps = (
|
||||||
return fn(...args);
|
return fn(...args);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
arg[name] = val;
|
arg[name] = val;
|
||||||
_props[name] = val;
|
_props[name] = val;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue