@_tc/template-core 0.1.3 → 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -17,7 +17,7 @@ const useCurrentMenuData = (useSibe = false) => {
|
|
|
17
17
|
const isSide = params[QK.sk];
|
|
18
18
|
const menuTypeIsTop = !!params[QK.k];
|
|
19
19
|
const menu = findMenuItem(projectInfo?.menu, menuTypeIsTop ? params[QK.k] : params[QK.sk]);
|
|
20
|
-
if (isSide && useSibe && menuTypeIsTop) {
|
|
20
|
+
if (isSide && useSibe && menuTypeIsTop && menu) {
|
|
21
21
|
const sMenu = findMenuItem(menu.sidebarConfig?.menu ?? [], params[QK.sk]);
|
|
22
22
|
return sMenu;
|
|
23
23
|
}
|
|
@@ -154,7 +154,7 @@ export function SubMenu({ eventKey, label, icon, disabled, popup: forcePopup, pa
|
|
|
154
154
|
const hoverBridgePlacement = mode === "top" && level > 0 ? "horizontal" : "auto";
|
|
155
155
|
const subMenuContent = (_jsx("div", { className: cn(
|
|
156
156
|
// "min-w-[180px]",
|
|
157
|
-
"
|
|
157
|
+
"rounded-xl border border-border/80 bg-popover p-2 text-popover-foreground", "shadow-[0_20px_56px_hsl(var(--background)/0.7),0_8px_18px_hsl(var(--foreground)/0.16),inset_0_1px_0_hsl(var(--foreground)/0.06)]"), children: _jsx(SubMenuLevelContext.Provider, { value: level + 1, children: _jsx("div", { className: "flex flex-col gap-1", children: children }) }) }));
|
|
158
158
|
/**
|
|
159
159
|
*
|
|
160
160
|
* submenu 生成的节点是 1 menuItem
|