Input 组件可以把前缀label 换成图标吗 #5197
Answered
by
zhushenhang
zhushenhang
asked this question in
Q&A
-
类似于图这种。 |
Beta Was this translation helpful? Give feedback.
Answered by
zhushenhang
May 17, 2022
Replies: 1 comment
-
已找到解决方案。在Form.Item里面,自己写个图标+Input组件,与此同时,label不设值。 |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
zhushenhang
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
已找到解决方案。在Form.Item里面,自己写个图标+Input组件,与此同时,label不设值。
<Form.Item name="password" rules={password} > <div className="flex"> //你的图标,其他样式自己调 <Input type="password" clearable placeholder="密码" /> </div> </Form.Item>