Skip to content

Commit 246e116

Browse files
committed
refactor: input-number
1 parent 2a47de6 commit 246e116

File tree

4 files changed

+36
-20
lines changed

4 files changed

+36
-20
lines changed

components/form/style/components.less

+3-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,9 @@
6565
.@{ant-prefix}-picker-calendar-year-select,
6666
.@{ant-prefix}-picker-calendar-month-select,
6767
.@{ant-prefix}-input-group .@{ant-prefix}-select,
68-
.@{ant-prefix}-input-group .@{ant-prefix}-cascader-picker {
68+
.@{ant-prefix}-input-group .@{ant-prefix}-cascader-picker,
69+
.@{ant-prefix}-input-number-group .@{ant-prefix}-select,
70+
.@{ant-prefix}-input-number-group .@{ant-prefix}-cascader-picker {
6971
width: auto;
7072
}
7173
}

components/form/style/mixin.less

+2-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@
3333
color: @text-color;
3434
}
3535

36-
.@{ant-prefix}-input-group-addon {
36+
.@{ant-prefix}-input-group-addon,
37+
.@{ant-prefix}-input-number-group-addon {
3738
color: @text-color;
3839
border-color: @border-color;
3940
}

components/form/style/rtl.less

+12-1
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
margin-left: 4px;
3333
}
3434
}
35+
3536
&::after {
3637
.@{form-prefix-cls}-rtl & {
3738
margin: 0 @form-item-label-colon-margin-left 0 @form-item-label-colon-margin-right;
@@ -97,7 +98,13 @@
9798
> .@{ant-prefix}-select .@{ant-prefix}-select-arrow,
9899
> .@{ant-prefix}-select .@{ant-prefix}-select-clear,
99100
:not(.@{ant-prefix}-input-group-addon) > .@{ant-prefix}-select .@{ant-prefix}-select-arrow,
100-
:not(.@{ant-prefix}-input-group-addon) > .@{ant-prefix}-select .@{ant-prefix}-select-clear {
101+
:not(.@{ant-prefix}-input-group-addon) > .@{ant-prefix}-select .@{ant-prefix}-select-clear,
102+
:not(.@{ant-prefix}-input-number-group-addon)
103+
> .@{ant-prefix}-select
104+
.@{ant-prefix}-select-arrow,
105+
:not(.@{ant-prefix}-input-number-group-addon)
106+
> .@{ant-prefix}-select
107+
.@{ant-prefix}-select-clear {
101108
.@{form-prefix-cls}-rtl & {
102109
right: auto;
103110
left: 32px;
@@ -106,6 +113,9 @@
106113

107114
> .@{ant-prefix}-select .@{ant-prefix}-select-selection-selected-value,
108115
:not(.@{ant-prefix}-input-group-addon)
116+
> .@{ant-prefix}-select
117+
.@{ant-prefix}-select-selection-selected-value,
118+
:not(.@{ant-prefix}-input-number-group-addon)
109119
> .@{ant-prefix}-select
110120
.@{ant-prefix}-select-selection-selected-value {
111121
.@{form-prefix-cls}-rtl & {
@@ -121,6 +131,7 @@
121131
margin-left: 19px;
122132
}
123133
}
134+
124135
&-clear {
125136
.@{form-prefix-cls}-rtl & {
126137
right: auto;

components/form/style/status.less

+19-17
Original file line numberDiff line numberDiff line change
@@ -48,26 +48,25 @@
4848
> .@{ant-prefix}-select .@{ant-prefix}-select-arrow,
4949
> .@{ant-prefix}-select .@{ant-prefix}-select-clear,
5050
:not(.@{ant-prefix}-input-group-addon) > .@{ant-prefix}-select .@{ant-prefix}-select-arrow,
51-
:not(.@{ant-prefix}-input-group-addon) > .@{ant-prefix}-select .@{ant-prefix}-select-clear {
51+
:not(.@{ant-prefix}-input-group-addon) > .@{ant-prefix}-select .@{ant-prefix}-select-clear,
52+
:not(.@{ant-prefix}-input-number-group-addon)
53+
> .@{ant-prefix}-select
54+
.@{ant-prefix}-select-arrow,
55+
:not(.@{ant-prefix}-input-number-group-addon)
56+
> .@{ant-prefix}-select
57+
.@{ant-prefix}-select-clear {
5258
right: 32px;
5359
}
5460
> .@{ant-prefix}-select .@{ant-prefix}-select-selection-selected-value,
5561
:not(.@{ant-prefix}-input-group-addon)
62+
> .@{ant-prefix}-select
63+
.@{ant-prefix}-select-selection-selected-value,
64+
:not(.@{ant-prefix}-input-number-group-addon)
5665
> .@{ant-prefix}-select
5766
.@{ant-prefix}-select-selection-selected-value {
5867
padding-right: 42px;
5968
}
6069

61-
// ======================= Cascader ========================
62-
.@{ant-prefix}-cascader-picker {
63-
&-arrow {
64-
margin-right: 19px;
65-
}
66-
&-clear {
67-
right: 32px;
68-
}
69-
}
70-
7170
// ======================== Picker =========================
7271
// Fix issue: https://github.com/ant-design/ant-design/issues/4783
7372
.@{ant-prefix}-picker {
@@ -179,12 +178,15 @@
179178
}
180179

181180
// fixes https://github.com/ant-design/ant-design/issues/20482
182-
.@{ant-prefix}-input-group-addon .@{ant-prefix}-select {
183-
&.@{ant-prefix}-select-single:not(.@{ant-prefix}-select-customize-input)
184-
.@{ant-prefix}-select-selector {
185-
background-color: inherit;
186-
border: 0;
187-
box-shadow: none;
181+
.@{ant-prefix}-input-group-addon,
182+
.@{ant-prefix}-input-number-group-addon {
183+
.@{ant-prefix}-select {
184+
&.@{ant-prefix}-select-single:not(.@{ant-prefix}-select-customize-input)
185+
.@{ant-prefix}-select-selector {
186+
background-color: inherit;
187+
border: 0;
188+
box-shadow: none;
189+
}
188190
}
189191
}
190192

0 commit comments

Comments
 (0)