打字稿不识别呈渲染图标的蚂蚁设计道具
我是打字稿和蚂蚁设计的新手。我有一个密码输入,并希望在输入元素内有一个打开/隐形图标。但是TypeScript给我一个错误,IntinSiCattributes& inputprops&重新归类。我该如何解决?
<Input
type="password"
className={styles["password-input"]}
placeholder="Password"
iconRender={(visible: ReactNode) =>
visible ? <EyeTwoTone /> : <EyeInvisibleOutlined />
}
/>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您应该使用
input.password
从antd
中输入密码。查看更多:You should use
Input.Password
for password input fromantd
. See more: https://ant.design/components/input/#components-input-demo-password-input