Revert "chore: hide linkage rule option in some buttons (#3046)" (#3051)

* Revert "chore: hide linkage rule option in some buttons (#3046)"

This reverts commit f0db975c1d.

* refactor: remove concole log
This commit is contained in:
被雨水过滤的空气-Rain 2023-11-16 11:52:22 +08:00 committed by GitHub
parent f0db975c1d
commit 14a21882e8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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';