fix(Autocomplete): internal input cannot apply fontFamily (#45197)

This commit is contained in:
JiaQi 2023-10-07 17:06:28 +08:00 committed by GitHub
parent 2f063a26e6
commit f42d0667c8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 3 deletions

View File

@ -19,7 +19,7 @@ function genSizeStyle(token: SelectToken, suffix?: string): CSSObject {
// ========================= Selector =========================
[`${componentCls}-selector`]: {
...resetComponent(token),
...resetComponent(token, true),
display: 'flex',
borderRadius,

View File

@ -11,7 +11,10 @@ export const textEllipsis: CSSObject = {
textOverflow: 'ellipsis',
};
export const resetComponent = (token: DerivativeToken): CSSObject => ({
export const resetComponent = (
token: DerivativeToken,
needInheritFontFamily = false,
): CSSObject => ({
boxSizing: 'border-box',
margin: 0,
padding: 0,
@ -21,7 +24,7 @@ export const resetComponent = (token: DerivativeToken): CSSObject => ({
lineHeight: token.lineHeight,
listStyle: 'none',
// font-feature-settings: @font-feature-settings-base;
fontFamily: token.fontFamily,
fontFamily: needInheritFontFamily ? 'inherit' : token.fontFamily,
});
export const resetIcon = (): CSSObject => ({