Antd:如何自定义关闭图标和搜索图标样式?
我在自定义关闭图标和搜索图标样式时遇到问题。 我想在输入左侧制作搜索图标,在输入右侧制作关闭图标。 但现在输入右侧有两个图标。
我怎样才能解决这个问题吗?
我的代码在这里
.ant-input {
padding: 4px 10px 4px 40px;
border-radius: 20px;
&-search {
height: 40px;
width: 240px !important;
}
&-suffix {
width: 18px;
> i {
font-size: 18px;
}
}
}
}
<div className='user-list__tollbar--search'>
<Search
onChange={this.onSearch}
style={{width: 200}}
defaultValue={keyWord}
allowClear
/>
</div>
I have a problem when custom close icon and search icon style.
I want to make search icon in left of input and close icon in right of input.
But now two icons is in right of input.
How can I fix this problem?
My code is here
.ant-input {
padding: 4px 10px 4px 40px;
border-radius: 20px;
&-search {
height: 40px;
width: 240px !important;
}
&-suffix {
width: 18px;
> i {
font-size: 18px;
}
}
}
}
<div className='user-list__tollbar--search'>
<Search
onChange={this.onSearch}
style={{width: 200}}
defaultValue={keyWord}
allowClear
/>
</div>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以使用 antd
Input
来解决您的问题You can use antd
Input
to solve your issue