🐞 fix: .ant-select-selector是content-box导致宽度不正常 (#36971)

* 🐞 fix: .ant-select-selector是content-box导致宽度不正常

* 🐞 fix: add resetComponent

* 🐞 fix: genItemStyle add box-sizing:border-box
This commit is contained in:
cl1107 2022-08-10 17:16:46 +08:00 committed by GitHub
parent af6d58fb5b
commit 00f59d32f0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 0 deletions

View File

@ -25,6 +25,7 @@ const genItemStyle: GenerateStyle<SelectToken, CSSObject> = token => {
fontWeight: 'normal',
fontSize: token.fontSize,
lineHeight: token.lineHeight,
boxSizing: 'border-box',
};
};

View File

@ -1,4 +1,5 @@
import type { CSSInterpolation, CSSObject } from '@ant-design/cssinjs';
import { resetComponent } from '../../style';
import type { SelectToken } from '.';
import { mergeToken } from '../../theme';
@ -17,6 +18,8 @@ function genSizeStyle(token: SelectToken, suffix?: string): CSSObject {
// ========================= Selector =========================
[`${componentCls}-selector`]: {
...resetComponent(token),
display: 'flex',
[`${componentCls}-selection-search`]: {
position: 'absolute',