我在打字稿和蚂蚁设计方面是新的。我有一个密码输入,并希望在输入元素中有一个开放/不可见的图标。但是类型记录给了我一个错误,iconRender不存在于'IntrinsicAttributes & InputProps & RefAttributes‘类型上。我怎么才能修好它?
<Input
type="password"
className={styles["password-input"]}
placeholder="Password"
iconRender={(visible: ReactNode) =>
visible ? <EyeTwoTone /> : <EyeInvisibleOutlined />
}
/>发布于 2022-05-09 14:18:30
您应该使用Input.Password从antd输入密码。见更多信息:https://ant.design/components/input/#components-input-demo-password-input
https://stackoverflow.com/questions/72172986
复制相似问题