mirror of
https://gitee.com/ant-design/ant-design.git
synced 2024-11-30 02:59:04 +08:00
fix(Autocomplete): internal input cannot apply fontFamily (#45197)
This commit is contained in:
parent
2f063a26e6
commit
f42d0667c8
@ -19,7 +19,7 @@ function genSizeStyle(token: SelectToken, suffix?: string): CSSObject {
|
|||||||
|
|
||||||
// ========================= Selector =========================
|
// ========================= Selector =========================
|
||||||
[`${componentCls}-selector`]: {
|
[`${componentCls}-selector`]: {
|
||||||
...resetComponent(token),
|
...resetComponent(token, true),
|
||||||
|
|
||||||
display: 'flex',
|
display: 'flex',
|
||||||
borderRadius,
|
borderRadius,
|
||||||
|
@ -11,7 +11,10 @@ export const textEllipsis: CSSObject = {
|
|||||||
textOverflow: 'ellipsis',
|
textOverflow: 'ellipsis',
|
||||||
};
|
};
|
||||||
|
|
||||||
export const resetComponent = (token: DerivativeToken): CSSObject => ({
|
export const resetComponent = (
|
||||||
|
token: DerivativeToken,
|
||||||
|
needInheritFontFamily = false,
|
||||||
|
): CSSObject => ({
|
||||||
boxSizing: 'border-box',
|
boxSizing: 'border-box',
|
||||||
margin: 0,
|
margin: 0,
|
||||||
padding: 0,
|
padding: 0,
|
||||||
@ -21,7 +24,7 @@ export const resetComponent = (token: DerivativeToken): CSSObject => ({
|
|||||||
lineHeight: token.lineHeight,
|
lineHeight: token.lineHeight,
|
||||||
listStyle: 'none',
|
listStyle: 'none',
|
||||||
// font-feature-settings: @font-feature-settings-base;
|
// font-feature-settings: @font-feature-settings-base;
|
||||||
fontFamily: token.fontFamily,
|
fontFamily: needInheritFontFamily ? 'inherit' : token.fontFamily,
|
||||||
});
|
});
|
||||||
|
|
||||||
export const resetIcon = (): CSSObject => ({
|
export const resetIcon = (): CSSObject => ({
|
||||||
|
Loading…
Reference in New Issue
Block a user