From acc5656490a94e44821ac7e3541626df1d2aaffb Mon Sep 17 00:00:00 2001 From: Junyi Date: Tue, 28 Feb 2023 23:58:10 +0800 Subject: [PATCH] fix(client): fix checkbox unchecked display (#1508) * fix(client): fix checkbox unchecked display * fix(client): revert global option back --- .../client/src/collection-manager/interfaces/checkbox.ts | 7 ------- packages/core/client/src/locale/zh_CN.ts | 2 +- .../client/src/schema-component/antd/checkbox/Checkbox.tsx | 3 --- 3 files changed, 1 insertion(+), 11 deletions(-) diff --git a/packages/core/client/src/collection-manager/interfaces/checkbox.ts b/packages/core/client/src/collection-manager/interfaces/checkbox.ts index 2b127fab7..3792a1794 100644 --- a/packages/core/client/src/collection-manager/interfaces/checkbox.ts +++ b/packages/core/client/src/collection-manager/interfaces/checkbox.ts @@ -18,13 +18,6 @@ export const checkbox: IField = { hasDefaultValue: true, properties: { ...defaultProps, - showUnchecked: { - type: 'boolean', - title: '{{t("Display X when unchecked")}}', - default: false, - 'x-decorator': 'FormItem', - 'x-component': 'Checkbox', - } }, filterable: { operators: operators.boolean, diff --git a/packages/core/client/src/locale/zh_CN.ts b/packages/core/client/src/locale/zh_CN.ts index 658f811fc..cbcb320f7 100644 --- a/packages/core/client/src/locale/zh_CN.ts +++ b/packages/core/client/src/locale/zh_CN.ts @@ -189,7 +189,7 @@ export default { "Formula.js supports most Microsoft Excel formula functions.": "Formula.js 支持大部分 Mircrosoft Excel 公式。", "Choices": "选择类型", "Checkbox": "勾选", - "Display X when unchecked": "未勾选时显示 X", + "Display when unchecked": "未勾选时显示 ", "Single select": "下拉菜单(单选)", "Multiple select": "下拉菜单(多选)", "Radio group": "单选框", diff --git a/packages/core/client/src/schema-component/antd/checkbox/Checkbox.tsx b/packages/core/client/src/schema-component/antd/checkbox/Checkbox.tsx index c9cd46c9b..e8e163763 100644 --- a/packages/core/client/src/schema-component/antd/checkbox/Checkbox.tsx +++ b/packages/core/client/src/schema-component/antd/checkbox/Checkbox.tsx @@ -25,9 +25,6 @@ export const Checkbox: ComposedCheckbox = connect( }, ), mapReadPretty((props) => { - if (!isValid(props.value)) { - return null; - } if (props.value) { return ; }