wip fix meta children
This commit is contained in:
parent
9db44aeae0
commit
2ee9e0df4b
|
|
@ -74,7 +74,7 @@ export const EdTreeName = ({
|
||||||
) : (
|
) : (
|
||||||
<div className="flex flex-col">
|
<div className="flex flex-col">
|
||||||
<Name name={node.text} is_jsx_prop={is_jsx_prop} />
|
<Name name={node.text} is_jsx_prop={is_jsx_prop} />
|
||||||
<div className={"text-[11px] text-gray-500 -mt-1"}>{item.id}</div>
|
{/* <div className={"text-[11px] text-gray-500 -mt-1"}>{item.id}</div> */}
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,7 @@ import { EdTreeCtxMenu } from "./item/ctx-menu";
|
||||||
import { EdTreeIndent } from "./item/indent";
|
import { EdTreeIndent } from "./item/indent";
|
||||||
import { EdTreeName } from "./item/name";
|
import { EdTreeName } from "./item/name";
|
||||||
import { treeItemKeyMap } from "./key-map";
|
import { treeItemKeyMap } from "./key-map";
|
||||||
|
import { useEffect } from "react";
|
||||||
|
|
||||||
export const nodeRender: NodeRender<EdMeta> = (node, prm) => {
|
export const nodeRender: NodeRender<EdMeta> = (node, prm) => {
|
||||||
const p = useGlobal(EDGlobal, "EDITOR");
|
const p = useGlobal(EDGlobal, "EDITOR");
|
||||||
|
|
@ -27,6 +28,10 @@ export const nodeRender: NodeRender<EdMeta> = (node, prm) => {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
|
ref={(el) => {
|
||||||
|
if (el) {
|
||||||
|
}
|
||||||
|
}}
|
||||||
tabIndex={0}
|
tabIndex={0}
|
||||||
className={cx(
|
className={cx(
|
||||||
"tree-item",
|
"tree-item",
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ import { ISection } from "../../../../utils/types/section";
|
||||||
import { IText } from "../../../../utils/types/text";
|
import { IText } from "../../../../utils/types/text";
|
||||||
import { VG } from "../../logic/global";
|
import { VG } from "../../logic/global";
|
||||||
import { extractNavigate, preload } from "../../logic/router";
|
import { extractNavigate, preload } from "../../logic/router";
|
||||||
import { ViewMetaRender } from "./render";
|
import { ViewMetaChildren } from "./children";
|
||||||
import { createLocal } from "./script/create-local";
|
import { createLocal } from "./script/create-local";
|
||||||
import { createPassProp } from "./script/create-pass-prop";
|
import { createPassProp } from "./script/create-pass-prop";
|
||||||
import { ErrorBox } from "./script/error-box";
|
import { ErrorBox } from "./script/error-box";
|
||||||
|
|
@ -26,7 +26,7 @@ export const ViewMetaScript: FC<{
|
||||||
hover: v.view.hover ? v.view.hover.get(item) : undefined,
|
hover: v.view.hover ? v.view.hover.get(item) : undefined,
|
||||||
active: v.view.active ? v.view.active.get(item) : undefined,
|
active: v.view.active ? v.view.active.get(item) : undefined,
|
||||||
});
|
});
|
||||||
const children = <ViewMetaRender meta={meta} v={v} className={className} />;
|
const children = <ViewMetaChildren item={item} />;
|
||||||
let args = {};
|
let args = {};
|
||||||
|
|
||||||
if (js && meta) {
|
if (js && meta) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue