UNPKG

syber-lowcode-business-materials

Version:
18 lines (17 loc) 790 B
import { ComponentType } from 'react'; /** * 简单包装,不做任何处理 * 部分组件ref比较特殊,包一层会解决这个问题 */ export declare function withWrap(Comp: ComponentType<any>): (props: any) => JSX.Element; /** * 某些组件会用React.Children.only检查子节点 * 需要做处理避免报错 */ export declare function withSingleChild(Comp: ComponentType<any>, needsConvert?: string[]): (props: any) => JSX.Element; export declare function withSingleFunctionChild(Comp: ComponentType<any>): (props: any) => JSX.Element; /** * moment对象在序列化后会被转为字符串 * 需要让日期类组件支持接受字符串值 */ export declare function withMomentProps(Comp: ComponentType<any>, needsConvert?: string[]): (props: any) => JSX.Element;