From acc41454d74d8b1e0f4c88e1a4b0cc1f3f831516 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=B4=E5=A4=9A=E7=9B=8A?= Date: Mon, 7 Jun 2021 12:05:38 +0800 Subject: [PATCH 1/4] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E5=AF=BC=E5=87=BA?= =?UTF-8?q?=E5=9C=A8=20Excel=20csv=20=E4=B9=B1=E7=A0=81=E9=97=AE=E9=A2=98?= =?UTF-8?q?=20(#2068)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/store/crud.ts | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/store/crud.ts b/src/store/crud.ts index 896494fde..b1bce245c 100644 --- a/src/store/crud.ts +++ b/src/store/crud.ts @@ -520,9 +520,13 @@ export const CRUDStore = ServiceStore.named('CRUDStore') import('papaparse').then((papaparse: any) => { const csvText = papaparse.unparse(items); if (csvText) { - const blob = new Blob([csvText], { - type: 'text/plain;charset=utf-8' - }); + const blob = new Blob( + // 加上 BOM 这样 Excel 打开的时候就不会乱码 + [new Uint8Array([0xef, 0xbb, 0xbf]), csvText], + { + type: 'text/plain;charset=utf-8' + } + ); saveAs(blob, 'data.csv'); } }); From 9588209ee25505113fc7fc6102635610128b2327 Mon Sep 17 00:00:00 2001 From: RickCole Date: Mon, 7 Jun 2021 14:47:38 +0800 Subject: [PATCH 2/4] =?UTF-8?q?fieldSet=20=E8=A1=A5=E5=85=85=20disabled=20?= =?UTF-8?q?=E9=85=8D=E7=BD=AE=E9=A1=B9=20(#2067)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/renderers/Form/FieldSet.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/renderers/Form/FieldSet.tsx b/src/renderers/Form/FieldSet.tsx index 7df570758..7a0a77076 100644 --- a/src/renderers/Form/FieldSet.tsx +++ b/src/renderers/Form/FieldSet.tsx @@ -92,13 +92,15 @@ export default class FieldSetControl extends React.Component< $path, classnames: cx, store, - formClassName + formClassName, + disabled } = this.props; let props: any = { store, data: store!.data, - render + render, + disabled }; mode && (props.mode = mode); typeof collapsable !== 'undefined' && (props.collapsable = collapsable); From 7a0c0a6dd742da48787af1a25dae10c88762d797 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A4=A9=E6=B5=B7=E3=82=8B=E3=82=8A?= Date: Tue, 8 Jun 2021 09:52:09 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E6=9B=B4=E6=94=B9topAndOther=E6=8F=8F?= =?UTF-8?q?=E8=BF=B0=E7=9A=84=E9=94=99=E5=88=AB=E5=AD=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/zh-CN/concepts/data-mapping.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/zh-CN/concepts/data-mapping.md b/docs/zh-CN/concepts/data-mapping.md index 989b2ee90..78de283a3 100755 --- a/docs/zh-CN/concepts/data-mapping.md +++ b/docs/zh-CN/concepts/data-mapping.md @@ -882,7 +882,7 @@ ${xxx | join[:glue]} ### topAndOther -取前多少个,身下的归位一组比如:`${list|topAndOther:10:name:Others}` +取前多少个,剩下的归位一组比如:`${list|topAndOther:10:name:Others}` 对数组分为 10 组,前面 9 组分别拿前 9 个,最后一组将剩下的归为一组,并对每项做数字累加。 From 2f8a04cee95ed08f122af0ec8c0515ffeee27a85 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=B4=E5=A4=9A=E7=9B=8A?= Date: Tue, 8 Jun 2021 13:39:23 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E8=A1=A5=E5=85=85=20date=20=E7=9A=84?= =?UTF-8?q?=E6=96=87=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/zh-CN/concepts/data-mapping.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/zh-CN/concepts/data-mapping.md b/docs/zh-CN/concepts/data-mapping.md index 78de283a3..71dc8ffdd 100755 --- a/docs/zh-CN/concepts/data-mapping.md +++ b/docs/zh-CN/concepts/data-mapping.md @@ -522,9 +522,9 @@ ${xxx | date[:format][:inputFormat]} ``` - **format**:需要展示的格式,默认为`LLL`,即本地化时间格式 -- **inputFormat**:指定该变量值的格式,默认为`X`,即时间戳秒,如果是毫秒则是 `x` - -具体参数的配置需要参考 [moment](https://momentjs.com/docs/) +- **inputFormat**:指定该变量值的格式,默认为`X`,即时间戳秒,具体参数的配置需要参考 [moment](https://momentjs.com/docs/),下面是其它几种常见的格式: + - `x`,毫秒 + - `YYYY-MM-DDTHH:mm:ssZ`,ISO8601 格式,其中 YYYY 是年,MM 是月,DD 是日,HH 是小时,mm 是分钟,ss 是秒 ```schema {