@nutui/nutui-react
Version:
京东风格的轻量级移动端 React 组件库,支持一套代码生成 H5 和小程序
40 lines (39 loc) • 1.53 kB
TypeScript
import React, { ReactNode } from 'react';
import { BaseFormField } from './types';
import { Context } from '../form/context';
import { BasicComponent } from "../../utils/typings";
type TextAlign = 'start' | 'end' | 'left' | 'right' | 'center' | 'justify' | 'match-parent';
export interface FormItemProps extends Omit<BasicComponent, 'children'>, BaseFormField {
required: boolean;
initialValue: any;
trigger: string;
valuePropName: string;
getValueFromEvent: (...args: any) => any;
onClick: (event: React.MouseEvent, componentRef: React.MutableRefObject<any>) => void;
errorMessageAlign: TextAlign;
validateTrigger: string | string[];
shouldUpdate: boolean;
noStyle: boolean;
children: ReactNode | ((obj: any) => React.ReactNode);
align?: 'flex-start' | 'center' | 'flex-end';
}
export declare class FormItem extends React.Component<Partial<FormItemProps>, {
resetCount: number;
}> {
static defaultProps: FormItemProps;
static contextType: any;
context: React.ContextType<typeof Context>;
private cancelRegister;
private componentRef;
private eventOff;
constructor(props: FormItemProps);
componentDidMount(): void;
componentWillUnmount(): void;
getControlled: (children: React.ReactElement) => any;
refresh: () => void;
onStoreChange: (type?: string) => void;
getClassNameWithDirection(className: string): string;
renderLayout: (childNode: React.ReactNode) => React.JSX.Element;
render(): React.JSX.Element;
}
export {};