ParameterStruct
返回参数组件,用于展示接口返回参数信息,支持嵌套结构和展开/折叠功能。
Installation Command
Preview
code:
string
状态码必填msg:
string
提示信息success/faildata:
object
响应数据详细数据对象name:
string
姓名age:
number
年龄Usage
Data Structure
API
Props
| Prop | Type | Required | Description |
|---|---|---|---|
| data | StructField[] | 参数数据数组 | |
| theme | string | 主题样式,可选 "light" | "dark" | |
| sectionBg | string | 区域背景样式 | |
| textTertiary | string | 次要文本颜色样式 | |
| hoverBg | string | 悬停背景样式 |
StructField
| Field | Type | Description |
|---|---|---|
| id | string | 唯一标识,用于 React key |
| type | string | 参数类型,如 "string", "number", "array", "object" 等 |
| field | string | 参数名称 |
| remark | string | 主要描述/备注 |
| remark2 | string | 次要描述,显示在 remark 之后 |
| stopwatch | string | 埋点链接,格式为 "[链接文本](链接地址)" |
| children | StructField[] | 子参数数组,用于嵌套结构 |
Type Colors
string
number / int / float
boolean
array
object