@ucloud-fe/react-components
Version:
UCloud react components
38 lines (37 loc) • 1.41 kB
TypeScript
import React, { InputHTMLAttributes, ReactNode } from 'react';
interface ColShape {
/** 栅格占位格数 */
span?: number;
/** 栅格向右偏移格数,偏移占位 */
offset?: number;
/** 栅格向左偏移格数,偏移不占位 */
pull?: number;
/** 栅格向右偏移格数,偏移不占位 */
push?: number;
}
export interface DefinedItemProps {
/** 表单项标签 */
label: ReactNode;
/** 标签的col配置 */
labelCol?: ColShape;
/** 控件的col配置 */
controllerCol?: ColShape;
/** 表单项的提示描述 */
help?: ReactNode;
/** 表单项是否为必填/必选,仅影响 UI,逻辑必须请看 ZForm rules 的 required */
required?: boolean;
/** 影响提示的状态/类型、包裹的控件的状态 */
status?: 'default' | 'success' | 'warning' | 'error' | 'loading';
/** 是否将状态传递给 item 下的表单控件(目前仅 Input 支持部分状态) */
shareStatus?: boolean;
/** 提示信息 */
tip?: {
/** 自定义提示图标 */
icon?: ReactNode;
/** 提示内容 */
content?: ReactNode;
} | ReactNode;
}
export declare type ItemProps = DefinedItemProps & Omit<InputHTMLAttributes<HTMLDivElement>, keyof DefinedItemProps>;
declare const _default: React.MemoExoticComponent<(props: ItemProps) => JSX.Element>;
export default _default;