mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-27 20:49:53 +08:00
fix: Tag component close icon display bug (#27226)
* fix: tag component close icon display bug * update tag component demo.test.snap
This commit is contained in:
parent
d3d394700b
commit
fd0a513718
@ -482,17 +482,17 @@ Array [
|
|||||||
class="ant-tag"
|
class="ant-tag"
|
||||||
>
|
>
|
||||||
Tag1
|
Tag1
|
||||||
<div
|
<span
|
||||||
class="ant-tag-close-icon"
|
class="ant-tag-close-icon"
|
||||||
>
|
>
|
||||||
关 闭
|
关 闭
|
||||||
</div>
|
</span>
|
||||||
</span>,
|
</span>,
|
||||||
<span
|
<span
|
||||||
class="ant-tag"
|
class="ant-tag"
|
||||||
>
|
>
|
||||||
Tag2
|
Tag2
|
||||||
<div
|
<span
|
||||||
class="ant-tag-close-icon"
|
class="ant-tag-close-icon"
|
||||||
>
|
>
|
||||||
<span
|
<span
|
||||||
@ -518,7 +518,7 @@ Array [
|
|||||||
/>
|
/>
|
||||||
</svg>
|
</svg>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</span>
|
||||||
</span>,
|
</span>,
|
||||||
]
|
]
|
||||||
`;
|
`;
|
||||||
|
@ -102,9 +102,9 @@ const InternalTag: React.ForwardRefRenderFunction<unknown, TagProps> = (
|
|||||||
const renderCloseIcon = () => {
|
const renderCloseIcon = () => {
|
||||||
if (closable) {
|
if (closable) {
|
||||||
return closeIcon ? (
|
return closeIcon ? (
|
||||||
<div className={`${prefixCls}-close-icon`} onClick={handleCloseClick}>
|
<span className={`${prefixCls}-close-icon`} onClick={handleCloseClick}>
|
||||||
{closeIcon}
|
{closeIcon}
|
||||||
</div>
|
</span>
|
||||||
) : (
|
) : (
|
||||||
<CloseOutlined className={`${prefixCls}-close-icon`} onClick={handleCloseClick} />
|
<CloseOutlined className={`${prefixCls}-close-icon`} onClick={handleCloseClick} />
|
||||||
);
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user