/** * @author linhd * @date 2023/11/8 10:39 * @description 描述文本+描述列表 */ import React, { FunctionComponent, ReactNode } from 'react'; import { TitleProps } from "../Title"; import './index.scss'; export interface DescriptionsListProps { /** 标题 */ label?: ReactNode; /** 内容 */ content?: ReactNode; /** 占比列,默认占比1 */ column?: number; [name: string]: any; } export interface DescriptionsProps { /** 样式class */ className?: string; /** style */ style?: React.CSSProperties; /** 横向padding设置 */ paddingRight?: number | string; /** 布局 */ layout?: 'horizontal' | 'vertical'; /** 是否展示边框 */ border?: boolean; /** 标题 */ title?: TitleProps | string; /** 列表配置 */ list?: DescriptionsListProps[]; /** * 每一列默认等分数, * layout='horizontal' 默认3等分 * layout='vertical' 默认4等分 * */ column?: number; /** * 是否折叠,默认不折叠 * 只有横向,没有边框才有这功能 * */ collapse?: boolean; /** * 是否展开,默认不展开,渲染首次 * */ defaultOpen?: boolean; /** * 是否展开,默认不展开,外部控制 * */ open?: boolean; /** * 收起状态最小高度 * 默认60 * */ collapsedHeight?: string | number; /** * 折叠回调 * */ onCollapse?: (bol: boolean) => void; } declare const Descriptions: FunctionComponent; export default Descriptions;