未验证 提交 b92b53af 编写于 作者: 赵林 提交者: GitHub

修复 connectForm 高阶组件 ref 透传 (#450)

* feat: 添加卡片类型的 theme

* feat: 调整圆角

* feat: 移除示例中的 theme

* fix: forward ref 透传 ref
Co-authored-by: N柏丘 <zhaolin.zhaolin@alibaba-inc.com>
上级 f1853ec5
import React from 'react';
import React, { forwardRef } from 'react';
import useForm from './useForm';
const connectForm = Component => {
return props => {
return forwardRef((props, ref) => {
const form = useForm();
return <Component {...props} form={form} />;
};
return <Component ref={ref} {...props} form={form} />;
});
};
export default connectForm;
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册