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

This commit is contained in:
被雨水过滤的空气-Rain 2023-11-15 16:32:28 +08:00 committed by GitHub
parent b497ef125e
commit f0db975c1d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 6 deletions

View File

@ -1,12 +1,13 @@
import { ArrayTable } from '@formily/antd-v5';
import { onFieldValueChange, onFieldInputValueChange, onFieldInit } from '@formily/core';
import { connect, ISchema, mapProps, useField, useFieldSchema, useForm, useFormEffects } from '@formily/react';
import { onFieldInputValueChange, 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';
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';
@ -17,7 +18,6 @@ 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;
const isLinkageAction = (linkageAction || isAction) && !['destroy', 'refresh'].includes(fieldSchema['x-action']);
const isChildCollectionAction = getChildrenCollections(name).length > 0 && fieldSchema['x-action'] === 'create';
const isDraggable = fieldSchema?.parent['x-component'] !== 'CollectionField';
const isDuplicateAction = fieldSchema['x-action'] === 'duplicate';

View File

@ -90,8 +90,6 @@ export const DuplicateAction = observer(
}
};
console.log('props', props);
return (
<div
className={cx(actionDesignerCss, {