跳转到内容

Descriptions 描述列表

何时使用

常见于详情页的信息展示。

代码演示

基本

loading

带边框的

loading

自定义尺寸

loading

响应式

loading

垂直

loading

垂直带边框的

loading

整行

loading

API

Descriptions

参数说明类型默认值版本
bordered是否展示边框booleanfalse
colon配置 Descriptions.Itemcolon 的默认值。表示是否显示 label 后面的冒号booleantrue
column一行的 DescriptionItems 数量,可以写成像素值或支持响应式的对象写法 { xs: 8, sm: 16, md: 24}number | Record<Breakpoint, number>3
extra描述列表的操作区域,显示在右上方ReactNode-4.5.0
items描述列表项内容DescriptionsItem[]-5.8.0
layout描述布局horizontal | verticalhorizontal
size设置列表的大小。可以设置为 middlesmall, 或不填(只有设置 bordered={true} 生效)default | middle | small-
title描述列表的标题,显示在最顶部ReactNode-
classNames语义化结构 class[Record<SemanticDOM, string>]-5.23.0
styles语义化结构 style[Record<SemanticDOM, CSSProperties>]-5.23.0

DescriptionItem

参数说明类型默认值版本
contentStyle自定义内容样式,请使用 styles.content 替换CSSProperties-4.9.0
label内容的描述ReactNode-
labelStyle自定义标签样式,请使用 styles.label 替换CSSProperties-4.9.0
span包含列的数量(filled 铺满当前行剩余部分)number| filled | Screens1screens: 5.9.0filled: 5.22.0

span 是 Description.Item 的数量。 span={2} 会占用两个 DescriptionItem 的宽度。当同时配置 stylelabelStyle(或 contentStyle)时,两者会同时作用。样式冲突时,后者会覆盖前者。

基于 MIT 许可发布