fix prop options
This commit is contained in:
parent
9a7308b3fb
commit
374fa9a145
|
|
@ -92,12 +92,17 @@ export const EdPropInstanceOptions: FC<{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const src = (
|
||||||
|
cprop.meta.optionsBuilt ||
|
||||||
|
cprop.meta.options ||
|
||||||
|
""
|
||||||
|
).trim();
|
||||||
const res = new Function(
|
const res = new Function(
|
||||||
...Object.keys(arg),
|
...Object.keys(arg),
|
||||||
"local",
|
"local",
|
||||||
`
|
`
|
||||||
try {
|
try {
|
||||||
const resOpt = ${cprop.meta.optionsBuilt || cprop.meta.options};
|
const resOpt = ${src.endsWith(";") ? src : `${src};`}
|
||||||
|
|
||||||
if (typeof resOpt === 'function') local.metaFn = resOpt;
|
if (typeof resOpt === 'function') local.metaFn = resOpt;
|
||||||
else local.options = resOpt;
|
else local.options = resOpt;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue