From b86193c349a2fbd5ef439f281c5a6f7e12bf5e06 Mon Sep 17 00:00:00 2001 From: chenos Date: Mon, 18 Dec 2023 21:01:32 +0800 Subject: [PATCH] fix: remove UpdateMode --- .../antd/action/Action.Designer.tsx | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) diff --git a/packages/core/client/src/schema-component/antd/action/Action.Designer.tsx b/packages/core/client/src/schema-component/antd/action/Action.Designer.tsx index 9d4fd8a95..24b106521 100644 --- a/packages/core/client/src/schema-component/antd/action/Action.Designer.tsx +++ b/packages/core/client/src/schema-component/antd/action/Action.Designer.tsx @@ -1,5 +1,5 @@ import { ArrayTable } from '@formily/antd-v5'; -import { onFieldValueChange } from '@formily/core'; +import { Field, onFieldValueChange } from '@formily/core'; import { ISchema, connect, mapProps, useField, useFieldSchema, useForm, useFormEffects } from '@formily/react'; import { isValid, uid } from '@formily/shared'; import { Alert, Tree as AntdTree, ModalProps } from 'antd'; @@ -22,13 +22,11 @@ import { SchemaSettingsLinkageRules, SchemaSettingsModalItem, SchemaSettingsRemove, - SchemaSettingsSelectItem, SchemaSettingsSwitchItem, } from '../../../schema-settings/SchemaSettings'; import { DefaultValueProvider } from '../../../schema-settings/hooks/useIsAllowToSetDefaultValue'; import { useLinkageAction } from './hooks'; import { requestSettingsSchema } from './utils'; -import { Field } from '@formily/core'; const Tree = connect( AntdTree, @@ -102,8 +100,8 @@ function ButtonEditor(props) { default: fieldSchema?.['x-component-props']?.danger ? 'danger' : fieldSchema?.['x-component-props']?.type === 'primary' - ? 'primary' - : 'default', + ? 'primary' + : 'default', enum: [ { value: 'default', label: '{{t("Default")}}' }, { value: 'primary', label: '{{t("Highlight")}}' }, @@ -696,17 +694,6 @@ export const actionSettingsItems: SchemaSettingOptions['items'] = [ }; }, }, - { - name: 'updateMode', - Component: UpdateMode, - useVisible() { - const fieldSchema = useFieldSchema(); - const isUpdateModePopupAction = ['customize:bulkUpdate', 'customize:bulkEdit'].includes( - fieldSchema['x-action'], - ); - return isUpdateModePopupAction; - }, - }, { name: 'secondConFirm', Component: SecondConFirm,