fix: InputNumber arrow align issue (#32409)

* fix: InputNumber arrow align issue

* fix input number demo
This commit is contained in:
afc163 2021-10-09 11:21:39 +08:00 committed by GitHub
parent d0206049e8
commit 46478d590f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 14 deletions

View File

@ -115,7 +115,8 @@ exports[`renders ./components/input-number/demo/addon.md correctly 1`] = `
class="ant-input-number-group-addon"
>
<div
class="ant-select select-before ant-select-single ant-select-show-arrow"
class="ant-select ant-select-single ant-select-show-arrow"
style="width:60px"
>
<div
class="ant-select-selector"
@ -252,7 +253,8 @@ exports[`renders ./components/input-number/demo/addon.md correctly 1`] = `
class="ant-input-number-group-addon"
>
<div
class="ant-select select-after ant-select-single ant-select-show-arrow"
class="ant-select ant-select-single ant-select-show-arrow"
style="width:60px"
>
<div
class="ant-select-selector"

View File

@ -20,13 +20,13 @@ import { SettingOutlined } from '@ant-design/icons';
const { Option } = Select;
const selectBefore = (
<Select defaultValue="add" className="select-before">
<Select defaultValue="add" style={{ width: 60 }}>
<Option value="add">+</Option>
<Option value="minus">-</Option>
</Select>
);
const selectAfter = (
<Select defaultValue="USD" className="select-after">
<Select defaultValue="USD" style={{ width: 60 }}>
<Option value="USD">$</Option>
<Option value="EUR"></Option>
<Option value="GBP">£</Option>
@ -47,13 +47,3 @@ ReactDOM.render(
mountNode,
);
```
```css
.select-before {
width: 50px;
}
.select-after {
width: 50px;
}
```

View File

@ -145,6 +145,9 @@
.@{input-number-prefix-cls}-handler {
.@{input-number-prefix-cls}-handler-up-inner,
.@{input-number-prefix-cls}-handler-down-inner {
display: flex;
align-items: center;
justify-content: center;
min-width: auto;
margin-right: 0;
font-size: 7px;