fix walk
This commit is contained in:
parent
8309a2971b
commit
592b479638
File diff suppressed because one or more lines are too long
|
|
@ -33,7 +33,7 @@ export const EdPropInstanceButton: FC<{
|
|||
for (const [k, v] of Object.entries(meta.item.script?.props)) {
|
||||
if (v.value) {
|
||||
eval(
|
||||
`try { arg.${k} = ${v.value} } catch(e) { console.error("arg", e); }`
|
||||
`try { arg.${k} = ${v.value} } catch(e) { console.error("arg", e); console.log("${k}", v.value); }`
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
@ -41,7 +41,7 @@ export const EdPropInstanceButton: FC<{
|
|||
for (const [k, v] of Object.entries(meta.item.component.props)) {
|
||||
if (v.valueBuilt) {
|
||||
eval(
|
||||
`try { arg.${k} = ${v.valueBuilt} } catch(e) { console.error("arg", e); }`
|
||||
`try { arg.${k} = ${v.valueBuilt} } catch(e) { console.error("arg", e); console.log("${k}", v.value); }`
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,7 +9,12 @@ export const walkProp = (arg: {
|
|||
instance: Record<string, string>;
|
||||
each: (name: string, prop: FNCompDef) => void;
|
||||
}) => {
|
||||
for (const [k, v] of Object.entries(arg.item_comp.component?.props || {})) {
|
||||
const props = Object.entries(arg.item_comp.component?.props || {}).sort(
|
||||
(a, b) => {
|
||||
return a[1].idx - b[1].idx;
|
||||
}
|
||||
);
|
||||
for (const [k, v] of props) {
|
||||
let prop = deepClone(v);
|
||||
const props = arg.item.component?.props;
|
||||
if (props && props[k]) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue