Skip to content

Commit f6f274b

Browse files
author
吴多益
authored
docs: 修复文档中过滤器 join 连接符描述错误问题 (#10306)
1 parent 7761c68 commit f6f274b

File tree

1 file changed

+19
-4
lines changed

1 file changed

+19
-4
lines changed

docs/zh-CN/concepts/data-mapping.md

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -880,10 +880,10 @@ ${xxx | split[:delimiter]}
880880
##### 基本用法
881881

882882
```
883-
${xxx | join[:glue]}
883+
${xxx | join[:separator]}
884884
```
885885

886-
- **glue**:连接符,默认为`空字符`
886+
- **separator**:连接符,默认为`逗号`
887887

888888
```schema
889889
{
@@ -893,12 +893,27 @@ ${xxx | join[:glue]}
893893
},
894894
"body": {
895895
"type": "tpl",
896-
"tpl": "array is ${array|join}" // 输出: array is abc
896+
"tpl": "array is ${array|join}"
897897
}
898898
}
899899
```
900900

901-
##### 配置连接符
901+
配置成空字符串
902+
903+
```schema
904+
{
905+
"type": "page",
906+
"data": {
907+
"array": ["a", "b", "c"]
908+
},
909+
"body": {
910+
"type": "tpl",
911+
"tpl": "array is ${array|join:''}"
912+
}
913+
}
914+
```
915+
916+
配置成连接符
902917

903918
```schema
904919
{

0 commit comments

Comments
 (0)