From f6f274b6d7eb98c8d47fea4f42448eec4fb07b41 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=B4=E5=A4=9A=E7=9B=8A?= Date: Fri, 31 May 2024 12:13:17 +0800 Subject: [PATCH] =?UTF-8?q?docs:=20=E4=BF=AE=E5=A4=8D=E6=96=87=E6=A1=A3?= =?UTF-8?q?=E4=B8=AD=E8=BF=87=E6=BB=A4=E5=99=A8=20join=20=E8=BF=9E?= =?UTF-8?q?=E6=8E=A5=E7=AC=A6=E6=8F=8F=E8=BF=B0=E9=94=99=E8=AF=AF=E9=97=AE?= =?UTF-8?q?=E9=A2=98=20(#10306)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/zh-CN/concepts/data-mapping.md | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/docs/zh-CN/concepts/data-mapping.md b/docs/zh-CN/concepts/data-mapping.md index e53f5f5e7..d9d2a5625 100755 --- a/docs/zh-CN/concepts/data-mapping.md +++ b/docs/zh-CN/concepts/data-mapping.md @@ -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 {