prasi fix
This commit is contained in:
parent
76990cb564
commit
665d143718
File diff suppressed because one or more lines are too long
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -124,9 +124,15 @@ export const devItem = (
|
|||
{ value: string; valueBuilt?: string }
|
||||
>;
|
||||
|
||||
for (const [item_id, changes] of Object.entries(pedit)) {
|
||||
if (mitem) {
|
||||
for (const [item_id, changes] of Object.entries(pedit)) {
|
||||
const meta = metas[item_id];
|
||||
if (!meta) continue;
|
||||
if (!meta.mitem) continue;
|
||||
|
||||
const mitem = meta.mitem;
|
||||
const item = mitem.toJSON();
|
||||
if (item) {
|
||||
const props = item?.component?.props as Record<string, FNCompDef>;
|
||||
const src = {} as Record<string, string>;
|
||||
for (const c of changes) {
|
||||
|
|
@ -166,6 +172,7 @@ export const devItem = (
|
|||
c.childs.filter((e) => e),
|
||||
compile
|
||||
);
|
||||
item.childs = childs;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -174,19 +181,19 @@ export const devItem = (
|
|||
src[k] = v.value;
|
||||
}
|
||||
|
||||
const result = await _api.code_build(src);
|
||||
for (const [k, v] of Object.entries(result) as any) {
|
||||
const code_result = await _api.code_build(src);
|
||||
for (const [k, v] of Object.entries(code_result) as any) {
|
||||
if (props[k]) {
|
||||
props[k].valueBuilt = v;
|
||||
} else if (compile[k]) {
|
||||
compile[k].valueBuilt = v;
|
||||
}
|
||||
}
|
||||
|
||||
result[item_id] = item;
|
||||
}
|
||||
}
|
||||
|
||||
if (mitem) {
|
||||
mitem.doc?.transact(() => {
|
||||
for (const [k, v] of Object.entries(result)) {
|
||||
const m = metas[k];
|
||||
|
|
|
|||
|
|
@ -167,6 +167,9 @@ export const modifyChild = (arg: any, passprop?: any, add_props?: any) => {
|
|||
}
|
||||
|
||||
if (Array.isArray(prop.children)) {
|
||||
if (prop.children.length === 1) {
|
||||
return modify(prop.children[0], prop, passprop, add_props);
|
||||
}
|
||||
const childs = [];
|
||||
for (const child of prop.children) {
|
||||
childs.push(modify(child, prop, passprop, add_props));
|
||||
|
|
|
|||
Loading…
Reference in New Issue