# Descriptions
用于详细描述某个事物。
# Descriptions Usage
# 基础用法
支持仅通过属性配置来实现对某个事物的详情展示。
Copy
# 自定义标签和内容
每个列表项的标签和内容都可以自定义。
Copy
# 与re-converter
结合使用
re-converter
可以很方便的将后端返回的数据进行转换,从而实现对re-descriptions
组件的描述。
Copy
# Descriptions API
# Attributes
参数 | 说明 | 类型 | 可选值 | 默认值 |
---|---|---|---|---|
items | 描述列表项数组 | Array<Item> | - | [] |
data | 描述列表数据对象 | String | - | {} |
layout | 描述列表的布局方式 | String | fixed , auto | fixed |
border | 是否带有边框 | Boolean | - | false |
column | 一行列表项的数量 | Number | - | 3 |
direction | 排列的方向 | String | vertical , horizontal | horizontal |
size | 列表的尺寸 | String | medium , small , mini | - |
title | 标题文本,显示在左上方 | String | - | - |
extra | 操作区文本,显示在右上方 | String | - | - |
colon | 是否显示冒号 | Boolean | - | true |
labelClassName | 自定义标签类名 | String | - | - |
contentClassName | 自定义内容类名 | String | - | - |
labelStyle | 自定义标签样式 | Object | - | - |
contentStyle | 自定义内容样式 | Object | - | - |
# Item 对象结构
属性 | 说明 | 类型 | 可选值 | 默认值 |
---|---|---|---|---|
prop | 字段标识 | String | - | - |
label | 标签文本 | String | - | - |
span | 所占列数 | Number | - | - |
labelClassName | 标签类名 | String | - | - |
contentClassName | 内容类名 | String | - | - |
labelStyle | 标签样式 | Object | - | - |
contentStyle | 内容样式 | Object | - | - |
labelComponent | 标签组件 | String | - | - |
labelComponentProps | 标签组件的props | Object | - | - |
labelComponentEvents | 标签组件的events | Object | - | - |
contentComponent | 内容组件 | Object | - | - |
contentComponentProps | 内容组件的props | Object | - | - |
contentComponentEvents | 内容组件的events | Object | - | - |
dataInProps | 内容组件所需数据的prop 名称 | String | - | data |
# Slots
名称 | 说明 | 参数 |
---|---|---|
title | 标题自定义内容 | - |
extra | 操作区自定义内容 | - |
label | 描述标签自定义内容 | {item, data} |
content | 描述内容自定义内容 | {item, data} |