docs: 修复文档中过滤器 join 连接符描述错误问题 (#10306)

This commit is contained in:
吴多益 2024-05-31 12:13:17 +08:00 committed by GitHub
parent 7761c682ea
commit f6f274b6d7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -880,10 +880,10 @@ ${xxx | split[:delimiter]}
##### 基本用法
```
${xxx | join[:glue]}
${xxx | join[:separator]}
```
- **glue**:连接符,默认为`空字符`
- **separator**:连接符,默认为`逗号`
```schema
{
@ -893,12 +893,27 @@ ${xxx | join[:glue]}
},
"body": {
"type": "tpl",
"tpl": "array is ${array|join}" // 输出: array is abc
"tpl": "array is ${array|join}"
}
}
```
##### 配置连接符
配置成空字符串
```schema
{
"type": "page",
"data": {
"array": ["a", "b", "c"]
},
"body": {
"type": "tpl",
"tpl": "array is ${array|join:''}"
}
}
```
配置成连接符
```schema
{