我是打字稿和 Ant 設計的新手。我有一個密碼輸入,并希望在輸入元素中有一個打開/不可見的圖示。但是打字稿給了我一個錯誤,iconRender 在型別“IntrinsicAttributes & InputProps & RefAttributes”上不存在。我該如何解決?
<Input
type="password"
className={styles["password-input"]}
placeholder="Password"
iconRender={(visible: ReactNode) =>
visible ? <EyeTwoTone /> : <EyeInvisibleOutlined />
}
/>
uj5u.com熱心網友回復:
Input.Password您應該使用antd. 查看更多:https ://ant.design/components/input/#components-input-demo-password-input
轉載請註明出處,本文鏈接:https://www.uj5u.com/qiye/472033.html
上一篇:通信組件的服務僅適用于一個
