Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
不要调用onClick(),只需将引用作为道具传递
onClick()
const Input: React.FC<Props> = ({ children, href, onClick }) => ( <a className="A" href={href} onClick={onClick}> {children} </a> );