fix
This commit is contained in:
parent
c8334b9996
commit
18b9f3b48c
|
|
@ -52,7 +52,7 @@ export const EdPropInstanceOptions: FC<{
|
||||||
|
|
||||||
if (cprop.meta?.options || cprop.meta?.optionsBuilt) {
|
if (cprop.meta?.options || cprop.meta?.optionsBuilt) {
|
||||||
if (!local.loaded || !local.metaFn) {
|
if (!local.loaded || !local.metaFn) {
|
||||||
let fn = '' as any;
|
let fn = "" as any;
|
||||||
let arg = {};
|
let arg = {};
|
||||||
try {
|
try {
|
||||||
if (p.site.config.api_url) {
|
if (p.site.config.api_url) {
|
||||||
|
|
@ -79,9 +79,16 @@ export const EdPropInstanceOptions: FC<{
|
||||||
if (meta.item.component) {
|
if (meta.item.component) {
|
||||||
for (const [k, v] of Object.entries(meta.item.component.props)) {
|
for (const [k, v] of Object.entries(meta.item.component.props)) {
|
||||||
if (v.valueBuilt) {
|
if (v.valueBuilt) {
|
||||||
eval(
|
try {
|
||||||
`try { arg.${k} = ${v.valueBuilt} } catch(e) { console.error("arg", e); }`
|
const evn = new Function(
|
||||||
|
"arg",
|
||||||
|
`arg["${k}"] = ${v.valueBuilt}`
|
||||||
);
|
);
|
||||||
|
evn(arg);
|
||||||
|
} catch (e) {
|
||||||
|
console.error(e);
|
||||||
|
console.warn(v.valueBuilt);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (v.content) {
|
if (v.content) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue