展示一个对象的只读属性。items 中每项提供唯一 key、label 和 value;多条记录的行列比较使用 Table。
基本用法
默认标签在左、值在右,最多两列。title 添加可见标题,titleAs 指定标题层级;无标题时可用 label 为列表提供可访问名称。
响应式列与跨列
columns 设置最多 1–4 列。以组件容器宽度为准,低于 36rem 为一列,达到 36、54、72rem 时依次允许两、三、四列,放入窄面板也会自动收拢。条目的 span 支持 1–4 并受当前列数限制;full 独占一行,保持原有阅读顺序。
标签方向与宽度
orientation="vertical" 将标签放到值的上方。横排的 labelWidth 默认 8em,最大占每项的 40%,长标签和值均可换行。文字方向继承所在区域的 dir。
分隔与密度
variant="divided" 为每项添加轻分隔线;默认 plain 仅用间距组织。density="compact" 收紧条目间距与字号,内部按钮尺寸由按钮自身决定。外围留白由页面或 Card 提供。
自定义内容与操作
label、value 插槽提供当前 item 和 index,可按 item.key 组合状态、复制或链接。trailing 插槽放独立标题操作,title 插槽定制标题文字;编辑和保存由调用方处理。
长值与空内容
普通值按原文显示,长地址和连续字符可换行。null、undefined 和空字符串使用 emptyValue,默认显示 —;数字 0 正常保留。布尔值请转为明确的业务文案,空数组不会生成虚构条目,需要引导时组合 EmptyState。
API
QuireDescriptions Props
Slots 内容位置
titleReplaces title text within the configured heading.
anytrailingIndependent header actions; no wrapper is created when absent.
anylabelEnriches each item's name without changing dt semantics.
{ item: { /** Stable unique identity, retained across updates and reordering. */ key: string; /** Human-readable name; the label slot may enrich its content. */ label: string; /** Literal value; null, undefined and empty strings use emptyValue. */ value?: undefined | null | string | number; /** Columns occupied, capped by the current responsive count; full starts a new row. */ span?: undefined | 2 | 1 | 3 | 4 | "full"; }; index: number; }valueReplaces each value with consumer-owned content or controls.
{ item: { /** Stable unique identity, retained across updates and reordering. */ key: string; /** Human-readable name; the label slot may enrich its content. */ label: string; /** Literal value; null, undefined and empty strings use emptyValue. */ value?: undefined | null | string | number; /** Columns occupied, capped by the current responsive count; full starts a new row. */ span?: undefined | 2 | 1 | 3 | 4 | "full"; }; index: number; }
Events 组件事件
无自定义事件。