Skip to content

FxDescriptions 描述列表

列表形式展示字段与值,支持 column 列数切分、direction 方向、border 边框、size 尺寸、title / extra 标题与操作区,以及 item 级 span / rowspan / width / align 等细粒度控制。

基础用法

尺寸

通过 size 配合 border 切换尺寸,#extra 插槽放置操作按钮,#label 插槽自定义 label(含图标)。

竖直列表

direction="vertical" 时 label 与 content 上下排列,:span="2" 跨列。

跨行

:rowspan="2" 跨行,horizontal 与 vertical 两种方向下的效果。

自定义样式

通过 label-align / align / label-class-name / class-name / width 自定义样式。

Descriptions API

Attributes

属性说明类型默认值
border是否显示边框(带边框时 label / content 分列两单元格)booleanfalse
column一行内 Descriptions Item 的数量number3
direction列表方向'horizontal' | 'vertical''horizontal'
size列表尺寸,省略时走 form / config-provider'large' | 'default' | 'small' | ''''
title标题文字,显示在左上string''
extra操作区文字,显示在右上string''
labelWidth每列 label 的宽度,优先级低于 item 自身的 labelWidthstring | number

Slots

插槽名说明
default放置 FxDescriptionsItem 子项
title自定义标题,替代 title prop
extra自定义操作区,替代 extra prop

DescriptionsItem API

Attributes

属性说明类型默认值
labellabel 文字string''
span该 item 跨多少列(colspan)number1
rowspan该 item 跨多少行(仅 horizontal + border 下生效)number1
width列宽(同一列取最大值;无 border 时含 label + content)string | number''
minWidth列最小宽度(按比例分配,有 width 的列固定)string | number''
labelWidthlabel 列宽,优先级高于父 Descriptions 的 labelWidthstring | number
aligncontent 对齐;无 border 时同时作用于 label'left' | 'center' | 'right''left'
labelAlignlabel 对齐,省略时回退到 align'left' | 'center' | 'right'
classNamecontent 自定义类名string''
labelClassNamelabel 自定义类名string''

Slots

插槽名说明
default自定义 content
label自定义 label(含图标等富内容)