wip fix
This commit is contained in:
parent
8579cdcc6e
commit
5cf979c882
|
|
@ -19,7 +19,13 @@ export const viParts = (meta: IMeta, arg?: ViParts) => {
|
|||
const props: React.DetailedHTMLProps<
|
||||
React.HTMLAttributes<HTMLDivElement>,
|
||||
HTMLDivElement
|
||||
> = {};
|
||||
> = {
|
||||
className: produceCSS(item, {
|
||||
mode: arg?.mode || "desktop",
|
||||
hover: arg?.hover,
|
||||
active: arg?.active,
|
||||
}),
|
||||
};
|
||||
|
||||
let shouldRenderChild = true;
|
||||
if (content.type === "text") {
|
||||
|
|
@ -28,11 +34,6 @@ export const viParts = (meta: IMeta, arg?: ViParts) => {
|
|||
}
|
||||
|
||||
return {
|
||||
className: produceCSS(item, {
|
||||
mode: arg?.mode || "desktop",
|
||||
hover: arg?.hover,
|
||||
active: arg?.active,
|
||||
}),
|
||||
shouldRenderChild,
|
||||
props,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@ export const ViRender: FC<{
|
|||
: meta.item.childs?.map((item) => {
|
||||
if (!item) return null;
|
||||
const { id } = item;
|
||||
|
||||
return (
|
||||
<ErrorBox key={id}>
|
||||
<ViRender ctx={ctx} meta={ctx.meta[id]} />
|
||||
|
|
@ -36,9 +37,5 @@ export const ViRender: FC<{
|
|||
});
|
||||
}
|
||||
|
||||
return (
|
||||
<div {...parts.props} className={parts.className}>
|
||||
{renderChild}
|
||||
</div>
|
||||
);
|
||||
return <div {...parts.props}>{renderChild}</div>;
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in New Issue