revert coomit

This commit is contained in:
期贤 2022-07-29 14:11:01 +08:00
parent 993e975e76
commit fb514b6deb
3 changed files with 7 additions and 7 deletions

View File

@ -10,7 +10,6 @@ const getHorizontalStyle: GenerateStyle<MenuToken> = token => {
lineWidth,
lineType,
menuItemPaddingInline,
menuItemMarginInline,
} = token;
return {
@ -33,7 +32,6 @@ const getHorizontalStyle: GenerateStyle<MenuToken> = token => {
display: 'inline-block',
verticalAlign: 'bottom',
paddingInline: menuItemPaddingInline,
marginInline: menuItemMarginInline,
},
[`> ${componentCls}-item:hover,

View File

@ -55,7 +55,6 @@ export interface MenuToken extends FullToken<'Menu'> {
menuItemHeight: number;
menuHorizontalHeight: number;
menuItemPaddingInline: number;
menuItemMarginInline: number;
menuArrowSize: number;
menuArrowOffset: string;
menuPanelMaskInset: number;
@ -405,8 +404,7 @@ export default (prefixCls: string, injectStyle: boolean): UseComponentStyleResul
// Menu Token
const menuToken = mergeToken<MenuToken>(token, {
menuItemHeight: controlHeightLG,
menuItemPaddingInline: 16,
menuItemMarginInline: 4,
menuItemPaddingInline: controlHeightLG / 2,
menuArrowSize,
menuHorizontalHeight: controlHeightLG * 1.15,
menuArrowOffset: `${menuArrowSize * 0.25}px`,

View File

@ -3,7 +3,7 @@ import type { MenuToken } from '.';
import type { GenerateStyle } from '../../theme';
const getVerticalInlineStyle: GenerateStyle<MenuToken, CSSObject> = token => {
const { componentCls, menuItemHeight, menuItemMarginInline, padding, menuArrowSize, fontSize } =
const { componentCls, menuItemHeight, marginXS, padding, marginXXS, menuArrowSize, fontSize } =
token;
const paddingWithArrow = menuArrowSize + fontSize;
@ -16,7 +16,7 @@ const getVerticalInlineStyle: GenerateStyle<MenuToken, CSSObject> = token => {
[`${componentCls}-item, ${componentCls}-submenu-title`]: {
height: menuItemHeight,
lineHeight: `${menuItemHeight}px`,
marginBlock: menuItemMarginInline,
marginBlock: marginXXS,
paddingInline: padding,
overflow: 'hidden',
textOverflow: 'ellipsis',
@ -27,6 +27,10 @@ const getVerticalInlineStyle: GenerateStyle<MenuToken, CSSObject> = token => {
paddingBottom: 0.02,
},
[`${componentCls}-item:not(:last-child)`]: {
marginBottom: marginXS,
},
[`> ${componentCls}-item,
> ${componentCls}-submenu > ${componentCls}-submenu-title`]: {
height: menuItemHeight,