From c85e570fd7bce9d7ca1d122744a7575f904e6f77 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BA=8C=E8=B4=A7=E7=88=B1=E5=90=83=E7=99=BD=E8=90=9D?= =?UTF-8?q?=E5=8D=9C?= Date: Tue, 15 Nov 2022 22:08:30 +0800 Subject: [PATCH] fix: menu style missing (#38583) --- components/menu/style/index.tsx | 6 +++--- components/menu/style/vertical.tsx | 6 ++---- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/components/menu/style/index.tsx b/components/menu/style/index.tsx index 1c763d8748..bf6d77b2ee 100644 --- a/components/menu/style/index.tsx +++ b/components/menu/style/index.tsx @@ -67,7 +67,7 @@ export interface MenuToken extends FullToken<'Menu'> { } // =============================== Base =============================== -const getBaseStyle: GenerateStyle = token => { +const getBaseStyle: GenerateStyle = (token) => { const { antCls, componentCls, @@ -243,7 +243,7 @@ const getBaseStyle: GenerateStyle = token => { ...resetIcon(), }, - [`&.${componentCls}-item-only-child`]: { + [`&${componentCls}-item-only-child`]: { [`> ${iconCls}, > ${componentCls}-item-icon`]: { marginInlineEnd: 0, }, @@ -481,7 +481,7 @@ export default (prefixCls: string, injectStyle: boolean): UseComponentStyleResul initZoomMotion(menuToken, 'zoom-big'), ]; }, - token => { + (token) => { const { colorPrimary, colorError, diff --git a/components/menu/style/vertical.tsx b/components/menu/style/vertical.tsx index b0c56c2e33..c686f0fb39 100644 --- a/components/menu/style/vertical.tsx +++ b/components/menu/style/vertical.tsx @@ -3,7 +3,7 @@ import { textEllipsis } from '../../style'; import type { MenuToken } from '.'; import type { GenerateStyle } from '../../theme'; -const getVerticalInlineStyle: GenerateStyle = token => { +const getVerticalInlineStyle: GenerateStyle = (token) => { const { componentCls, menuItemHeight, @@ -27,9 +27,7 @@ const getVerticalInlineStyle: GenerateStyle = token => { paddingInline: padding, overflow: 'hidden', textOverflow: 'ellipsis', - }, - [`${componentCls}-item, ${componentCls}-submenu-title`]: { marginInline: itemMarginInline, marginBlock: menuItemMarginInline, width: `calc(100% - ${itemMarginInline * 2}px)`, @@ -53,7 +51,7 @@ const getVerticalInlineStyle: GenerateStyle = token => { }; }; -const getVerticalStyle: GenerateStyle = token => { +const getVerticalStyle: GenerateStyle = (token) => { const { componentCls, iconCls,