# fileds
对象介绍:
- fields对象可用于内容模块的field字段,通过"needLayout"字段控制是否并排布局,如果当前为true且下一个也为true时,则这两个并排布局,否则单独一行排列
字段定义:
字段 | 必须 | 类型 | 取值 | 说明 |
---|---|---|---|---|
needLayout | 是 | Boolean | true / false | 是否并排布局 |
text | 是 | Struct | text对象 | 文本内容 |
样例结构
- 基础结构-非并排
{
"needLayout": false,
"text": {
"tag": "plain_text",
"content": "text"
}
}
1
2
3
4
5
6
7
2
3
4
5
6
7
- 基础结构-并排
{
"needLayout": true,
"text": {
"tag": "plain_text",
"content": "text"
}
}
1
2
3
4
5
6
7
2
3
4
5
6
7
# 样式示例
# json示例
{
"modules": [
{
"tag": "div",
"fields": [
{
"needLayout": true,
"text": {
"tag": "hi_md", // hi_md 开发中 !!!
"content": "**申请人**\n王晓磊"
}
},
{
"needLayout": true,
"text": {
"tag": "hi_md", // hi_md 开发中 !!!
"content": "**休假类型:**\n年假"
}
},
{
"needLayout": false,
"text": {
"tag": "hi_md", // hi_md 开发中 !!!
"content": "**时间:**\n2020-4-8 至 2020-4-10(共3天)"
}
},
{
"needLayout": false,
"text": {
"tag": "plain_text",
"content": "普通文本"
}
}
]
}
]
}
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
33
34
35
36
37
38
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
33
34
35
36
37
38