Browse Source

fix: Input suffix should work with append (#21105)

pull/21107/head
二货机器人 5 years ago
committed by GitHub
parent
commit
996b7bc8f0
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 33
      components/input/__tests__/__snapshots__/demo.test.js.snap
  2. 4
      components/input/demo/align.md
  3. 4
      components/input/style/mixin.less

33
components/input/__tests__/__snapshots__/demo.test.js.snap

@ -881,6 +881,39 @@ exports[`renders ./components/input/demo/align.md correctly 1`] = `
</span>
</div>
</div>
<br />
<span
class="ant-input-group-wrapper"
>
<span
class="ant-input-wrapper ant-input-group"
>
<span
class="ant-input-group-addon"
>
Http://
</span>
<span
class="ant-input-affix-wrapper"
>
<span
class="ant-input-prefix"
>
$
</span>
<input
class="ant-input"
type="text"
value="mysite"
/>
</span>
<span
class="ant-input-group-addon"
>
.com
</span>
</span>
</span>
</div>
`;

4
components/input/demo/align.md

@ -93,6 +93,10 @@ ReactDOM.render(
<RadioButton value="b">Shanghai</RadioButton>
</RadioGroup>
<AutoComplete style={{ width: 100 }} placeholder="input here" />
<br />
<Input prefix="$" addonBefore="Http://" addonAfter=".com" defaultValue="mysite" />
</div>,
mountNode,
);

4
components/input/style/mixin.less

@ -306,9 +306,7 @@
}
.@{inputClass}-affix-wrapper {
display: table-cell;
float: left;
width: 100%;
border-radius: 0;
}
&&-compact {

Loading…
Cancel
Save