diff --git a/components/input/__tests__/__snapshots__/demo.test.js.snap b/components/input/__tests__/__snapshots__/demo.test.js.snap index 416dd244ca..fc988d2588 100644 --- a/components/input/__tests__/__snapshots__/demo.test.js.snap +++ b/components/input/__tests__/__snapshots__/demo.test.js.snap @@ -50,26 +50,37 @@ exports[`renders ./components/input/demo/basic.vue correctly 1`] = ` exports[`renders ./components/input/demo/borderless.vue correctly 1`] = ``; exports[`renders ./components/input/demo/group.vue correctly 1`] = ` -


Zhejiang +
+
-
- - -

Option1 +
+ +
Zhejiang + +
+ + +
+
Option1 +
-

- +
+
+ +
-

Option1-1 +
+
Option1-1 +
@@ -83,14 +94,18 @@ exports[`renders ./components/input/demo/group.vue correctly 1`] = ` -

Between +
+
Between +
-

Sign Up +
+
Sign Up +
@@ -104,8 +119,10 @@ exports[`renders ./components/input/demo/group.vue correctly 1`] = ` -

Home +
+
Home +
@@ -119,8 +136,15 @@ exports[`renders ./components/input/demo/group.vue correctly 1`] = ` -


-
+
+ +
+ +
+ +
+ +
`; exports[`renders ./components/input/demo/password-input.vue correctly 1`] = ` @@ -152,7 +176,7 @@ exports[`renders ./components/input/demo/password-input.vue correctly 1`] = ` `; exports[`renders ./components/input/demo/presuffix.vue correctly 1`] = ` -
+


RMB
diff --git a/components/input/style/index.ts b/components/input/style/index.ts index f3d37358be..7653f78707 100644 --- a/components/input/style/index.ts +++ b/components/input/style/index.ts @@ -230,15 +230,6 @@ export const genInputGroupStyle = (token: InputToken): CSSObject => { ...genInputSmallStyle(token), }, - // Fix https://github.com/ant-design/ant-design/issues/5754 - [`&-lg ${antCls}-select-single ${antCls}-select-selector`]: { - height: token.controlHeightLG, - }, - - [`&-sm ${antCls}-select-single ${antCls}-select-selector`]: { - height: token.controlHeightSM, - }, - [`> ${componentCls}`]: { display: 'table-cell', @@ -501,6 +492,45 @@ export const genInputGroupStyle = (token: InputToken): CSSObject => { }, }, }, + + [`&&-sm ${antCls}-btn`]: { + fontSize: token.fontSizeSM, + height: token.controlHeightSM, + lineHeight: 'normal', + }, + + [`&&-lg ${antCls}-btn`]: { + fontSize: token.fontSizeLG, + height: token.controlHeightLG, + lineHeight: 'normal', + }, + + // Fix https://github.com/ant-design/ant-design/issues/5754 + [`&&-lg ${antCls}-select-single ${antCls}-select-selector`]: { + height: `${token.controlHeightLG}px`, + + [`${antCls}-select-selection-item, ${antCls}-select-selection-placeholder`]: { + // -2 is for the border size & override default + lineHeight: `${token.controlHeightLG - 2}px`, + }, + + [`${antCls}-select-selection-search-input`]: { + height: `${token.controlHeightLG}px`, + }, + }, + + [`&&-sm ${antCls}-select-single ${antCls}-select-selector`]: { + height: `${token.controlHeightSM}px`, + + [`${antCls}-select-selection-item, ${antCls}-select-selection-placeholder`]: { + // -2 is for the border size & override default + lineHeight: `${token.controlHeightSM - 2}px`, + }, + + [`${antCls}-select-selection-search-input`]: { + height: `${token.controlHeightSM}px`, + }, + }, }; };