我是这样做的,可以实现。 const listRef = useRef(null); .... useEffect(() => { listRef.current(); }, []); return ( .... <Form.List name='list'> {(fields, {add, remove}) => { listRef.current = add; .... }}; </Form.List> ) `
我是这样做的,可以实现。