From b2a44937c9ef9c7e0e35879017969e1be1505f4d Mon Sep 17 00:00:00 2001 From: rizky Date: Fri, 2 Aug 2024 05:14:07 -0700 Subject: [PATCH] fix --- comps/custom/Breadcrumb.tsx | 15 ++++++++++++--- comps/md/MasterDetail.tsx | 5 ++++- comps/md/parts/MDDetail.tsx | 1 + comps/md/utils/md-render-loop.tsx | 6 +++--- comps/md/utils/typings.ts | 1 + 5 files changed, 21 insertions(+), 7 deletions(-) diff --git a/comps/custom/Breadcrumb.tsx b/comps/custom/Breadcrumb.tsx index 4c18207..09e2672 100755 --- a/comps/custom/Breadcrumb.tsx +++ b/comps/custom/Breadcrumb.tsx @@ -54,9 +54,18 @@ export const Breadcrumb: FC = ({ value, className }) => { ) : ( <> - {(!local.value || local.value.length === 0) && - isEditor && - "Breadcrumb"} + {(!local.value || local.value.length === 0) && isEditor && ( + <> + {" "} + {isDesktop ? ( + "Breadcrumb" + ) : ( +

+ Breadcrumb +

+ )} + + )} {isDesktop && ( <> {list.map((cur, index): ReactNode => { diff --git a/comps/md/MasterDetail.tsx b/comps/md/MasterDetail.tsx index fd41fe8..873f557 100755 --- a/comps/md/MasterDetail.tsx +++ b/comps/md/MasterDetail.tsx @@ -22,6 +22,7 @@ export const MasterDetail: FC = (arg) => { tab_mode, editor_tab, gen_fields, + footer, gen_table, on_init, _item, @@ -69,7 +70,7 @@ export const MasterDetail: FC = (arg) => { masterDetailApplyParams(md); }, }, - master: { render() {} }, + master: { render() {}, reload() {} }, panel: { size: 25, min_size: 0, @@ -128,6 +129,7 @@ export const MasterDetail: FC = (arg) => { md.header.render(); }, [title]); } + return (
= (arg) => { {md.props.mode === "full" && } {md.props.mode === "v-split" && } {md.props.mode === "h-split" && } + {[footer]} )}
diff --git a/comps/md/parts/MDDetail.tsx b/comps/md/parts/MDDetail.tsx index 210cefc..8705505 100755 --- a/comps/md/parts/MDDetail.tsx +++ b/comps/md/parts/MDDetail.tsx @@ -17,6 +17,7 @@ export const MDDetail: FC<{ md: MDLocal; mdr: MDRef }> = ({ md, mdr }) => { if (!detail) { return null; } + return ( <> {md.props.show_head === "only-child" && } diff --git a/comps/md/utils/md-render-loop.tsx b/comps/md/utils/md-render-loop.tsx index 300ce57..efcb37e 100755 --- a/comps/md/utils/md-render-loop.tsx +++ b/comps/md/utils/md-render-loop.tsx @@ -10,16 +10,16 @@ export const mdRenderLoop = (md: MDLocal, mdr: MDRef, props: MDProps) => { return e.component?.id === "c68415ca-dac5-44fe-aeb6-936caf8cc491"; }); if (master) { - if (!md.master) md.master = { render() {} }; + if (!md.master) md.master = { render() {}, reload() {} }; } mdr.master = master; - const tablist = [] + const tablist = []; for (const c of childs) { const props = c.edit?.props; if (props && props.name.mode === "string") { const name = props.name.value || ""; if (name) { - tablist.push(name) + tablist.push(name); mdr.childs[name] = c; if (!md.childs[name]) { md.childs[name] = { diff --git a/comps/md/utils/typings.ts b/comps/md/utils/typings.ts index 29e5807..e933fb3 100755 --- a/comps/md/utils/typings.ts +++ b/comps/md/utils/typings.ts @@ -21,6 +21,7 @@ export type MDProps = { tab_mode: "h-tab" | "v-tab" | "hidden"; editor_tab: string; gen_fields: any; + footer: any; gen_table: string; on_init: (md: MDLocal) => void; _item: PrasiItem;