From 14a21882e8e3e3d11ea674f6005c1dd8d68e6689 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=A2=AB=E9=9B=A8=E6=B0=B4=E8=BF=87=E6=BB=A4=E7=9A=84?= =?UTF-8?q?=E7=A9=BA=E6=B0=94-Rain?= <958414905@qq.com> Date: Thu, 16 Nov 2023 11:52:22 +0800 Subject: [PATCH] Revert "chore: hide linkage rule option in some buttons (#3046)" (#3051) * Revert "chore: hide linkage rule option in some buttons (#3046)" This reverts commit f0db975c1d28d0c4d3fa3897da2444bdbffdf7f4. * refactor: remove concole log --- .../src/schema-component/antd/action/Action.Designer.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 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 0119dfe70..7d06f08eb 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,13 +1,12 @@ import { ArrayTable } from '@formily/antd-v5'; -import { onFieldInputValueChange, onFieldValueChange } from '@formily/core'; -import { ISchema, connect, mapProps, useField, useFieldSchema, useForm, useFormEffects } from '@formily/react'; +import { onFieldValueChange, onFieldInputValueChange, onFieldInit } from '@formily/core'; +import { connect, ISchema, mapProps, useField, useFieldSchema, useForm, useFormEffects } from '@formily/react'; import { isValid, uid } from '@formily/shared'; import { Alert, Tree as AntdTree, ModalProps } from 'antd'; import { cloneDeep } from 'lodash'; import React, { useCallback, useEffect, useMemo, useState } from 'react'; import { useTranslation } from 'react-i18next'; import { RemoteSelect, useCompile, useDesignable } from '../..'; -import { usePlugin } from '../../../application/hooks'; import { CollectionOptions, useCollection, useCollectionManager } from '../../../collection-manager'; import { FlagProvider } from '../../../flag-provider'; import { useRecord } from '../../../record-provider'; @@ -18,6 +17,7 @@ import { useSyncFromForm } from '../../../schema-settings/DataTemplates/utils'; import { DefaultValueProvider } from '../../../schema-settings/hooks/useIsAllowToSetDefaultValue'; import { useLinkageAction } from './hooks'; import { requestSettingsSchema } from './utils'; +import { usePlugin } from '../../../application/hooks'; const Tree = connect( AntdTree, @@ -910,7 +910,7 @@ export const ActionDesigner = (props) => { fieldSchema['x-action'] || '', ); const isUpdateModePopupAction = ['customize:bulkUpdate', 'customize:bulkEdit'].includes(fieldSchema['x-action']); - const isLinkageAction = (linkageAction || isAction) && !['destroy', 'refresh'].includes(fieldSchema['x-action']); + const isLinkageAction = linkageAction || isAction; const isChildCollectionAction = getChildrenCollections(name).length > 0 && fieldSchema['x-action'] === 'create'; const isDraggable = fieldSchema?.parent['x-component'] !== 'CollectionField'; const isDuplicateAction = fieldSchema['x-action'] === 'duplicate';