单列文本
文本组件支持两种类型:普通文本plain 和 markdown文本
参数说明
名称 | 是否必填 | 参数类型 | 说明 |
---|---|---|---|
text | 是 | object | 文本组件配置 |
∟ tag | 是 | string | 组件的标签,文本组件tag=text |
∟ text | 是 | object | 文本内容 |
∟ ∟ type | 是 | string | 文本类型,支持 plain 和 markdown 两种类型 |
∟ ∟ content | 是 | string | 文本内容 |
∟ ∟ text_size | 否 | string | 文本大小: - xxxx-large (30px):超大文本,适用于重要标题或突出显示- xxx-large (24px):特大文本,适用于标题或重要提示- xx-large (20px):大文本,适用于段落标题- x-large (18px):较大文本,适用于正文内容- large (16px):标准大文本,适用于普通正文- medium (14px):中等文本,适用于辅助说明- small (12px):小文本,适用于注释或细小说明- x-small (10px):超小文本,适用于图标旁的提示或备注 |
∟ ∟ text_align | 否 | string | 文本对齐方式(支持的值:left , center , right ) |
∟ ∟ icon | 否 | object | 前缀图标配置 |
∟ ∟ ∟ tag | 是 | string | 图标类型,目前仅支持 custom_icon |
∟ ∟ ∟ storage_key | 是 | string | 图片存储 key |
∟ href | 否 | array | 若 content 中为 markdown 文本,且配置了超链接,该字段用于实现差异化链接 |
∟ ∟ key | 是 | string | 差异化链接URL的变量 |
∟ ∟ value | 是 | string | 差异化链接URL的变量的值 |
∟ ∟ ∟ url | 是 | string | 默认的链接地址 |
∟ ∟ ∟ pc_url | 否 | string | PC 端的链接地址 |
∟ ∟ ∟ ios_url | 否 | string | iOS 端的链接地址 |
∟ ∟ ∟ android_url | 否 | string | Android 端的链接地址 |
∟ link | 否 | object | 组件整体的跳转链接 |
∟ ∟ url | 是 | string | 默认的链接地址 |
∟ ∟ pc_url | 否 | string | PC 端的链接地址 |
∟ ∟ ios_url | 否 | string | iOS 端的链接地址 |
∟ ∟ android_url | 否 | string | Android 端的链接地址 |
图片示例
JSON结构
markdown JSON结构
json
{
"text": {
"tag": "text",
"text": {
"content": "文本内容",
"type": "markdown",
"text_size": "xxx-large",
"text_align": "center",
"icon": {
"tag": "custom_icon",
"storage_key": "图片存储key"
}
},
"href": [
{
"key": "卡片跳转链接key",
"value": {
"android_url": "string",
"ios_url": "string",
"pc_url": "string",
"url": "https://www.baidu.com"
}
}
],
"link": {
"android_url": "",
"ios_url": "",
"pc_url": "",
"url": "https://www.baidu.com"
}
}
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
plain JSON结构
json
{
"text": {
"tag": "text",
"text": {
"content": "文本内容",
"type": "plain",
"text_size": "xxx-large",
"text_align": "center",
"icon": {
"tag": "custom_icon",
"storage_key": "图片存储key"
}
},
"link": {
"android_url": "",
"ios_url": "",
"pc_url": "",
"url": "https://www.baidu.com"
}
}
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21