wip fix
This commit is contained in:
parent
cda1a66c60
commit
6910088b0a
|
|
@ -16,10 +16,18 @@ import { SideLabel } from "./ui/SideLabel";
|
|||
export const EdStyleAll = () => {
|
||||
const p = useGlobal(EDGlobal, "EDITOR");
|
||||
|
||||
const meta = active.comp_id
|
||||
let meta = active.comp_id
|
||||
? p.comp.list[active.comp_id].meta[active.item_id]
|
||||
: p.page.meta[active.item_id];
|
||||
|
||||
if (
|
||||
meta.item.component?.props?.child &&
|
||||
meta.item.component?.props?.child?.content?.id &&
|
||||
meta.item.component?.useStyle
|
||||
) {
|
||||
meta = p.page.meta[meta.item.component.props.child.content.id];
|
||||
}
|
||||
|
||||
let item = meta?.item;
|
||||
let is_inherit = false;
|
||||
if (item?.component?.id) {
|
||||
|
|
|
|||
|
|
@ -100,7 +100,7 @@ export const EdTreeAction = ({
|
|||
)}
|
||||
onClick={(e) => {
|
||||
if (
|
||||
item.component?.props.child.content?.id &&
|
||||
item.component?.props?.child?.content?.id &&
|
||||
child_jsx_has_script
|
||||
) {
|
||||
e.stopPropagation();
|
||||
|
|
|
|||
|
|
@ -238,7 +238,7 @@ const GenerateJSX: FC<{ meta: IMeta }> = ({ meta }) => {
|
|||
}
|
||||
|
||||
if (mitem) {
|
||||
const genJSX = fillID(findDefaultJSX(p, mitem));
|
||||
const genJSX = findDefaultJSX(p, mitem);
|
||||
const ijson = mitem.toJSON() as IItem;
|
||||
|
||||
mitem.doc?.transact(() => {
|
||||
|
|
@ -307,5 +307,5 @@ export const findDefaultJSX = (p: PG, mitem: MItem): IItem => {
|
|||
}
|
||||
}
|
||||
|
||||
return resetJSXProp;
|
||||
return fillID(resetJSXProp) as any;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ export const nodeOnDrop: (
|
|||
treeRebuild(p);
|
||||
p.render();
|
||||
} else {
|
||||
const child_id = toMeta.item.component?.props.child.content?.id;
|
||||
const child_id = toMeta.item.component?.props?.child?.content?.id;
|
||||
if (child_id) {
|
||||
const child_meta = getMetaById(p, child_id);
|
||||
if (child_meta) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue