File tree 2 files changed +11
-4
lines changed
2 files changed +11
-4
lines changed Original file line number Diff line number Diff line change 35
35
color : @text-color ;
36
36
}
37
37
38
- .@{ant-prefix} -input-group-addon ,
39
- .@{ant-prefix} -input-number-group-addon {
38
+ : not ( . @{ant-prefix} -input-group-addon-disabled ) .@{ant-prefix} -input-group-addon ,
39
+ : not ( . @{ant-prefix} -input-number-group-addon-disabled ) .@{ant-prefix} -input-number-group-addon {
40
40
color : @text-color ;
41
41
border-color : @border-color ;
42
42
}
Original file line number Diff line number Diff line change @@ -144,6 +144,7 @@ export default defineComponent({
144
144
size,
145
145
direction,
146
146
hidden,
147
+ disabled,
147
148
} = props ;
148
149
// Not wrap when there is not addons
149
150
if ( ! hasAddon ( { addonBefore, addonAfter } ) ) {
@@ -152,10 +153,16 @@ export default defineComponent({
152
153
153
154
const wrapperClassName = `${ prefixCls } -group` ;
154
155
const addonClassName = `${ wrapperClassName } -addon` ;
156
+ // fix form error style for input addonAfter slot when disabled
157
+ const mergedAddonClassName = classNames ( addonClassName , {
158
+ [ `${ addonClassName } -disabled` ] : disabled ,
159
+ } ) ;
155
160
const addonBeforeNode = addonBefore ? (
156
- < span class = { addonClassName } > { addonBefore } </ span >
161
+ < span class = { mergedAddonClassName } > { addonBefore } </ span >
162
+ ) : null ;
163
+ const addonAfterNode = addonAfter ? (
164
+ < span class = { mergedAddonClassName } > { addonAfter } </ span >
157
165
) : null ;
158
- const addonAfterNode = addonAfter ? < span class = { addonClassName } > { addonAfter } </ span > : null ;
159
166
160
167
const mergedWrapperClassName = classNames ( `${ prefixCls } -wrapper` , wrapperClassName , {
161
168
[ `${ wrapperClassName } -rtl` ] : direction === 'rtl' ,
You can’t perform that action at this time.
0 commit comments