From 93839acdb7d3f61146bbcd9acc3a7a234c10328c Mon Sep 17 00:00:00 2001 From: Katherine Date: Mon, 28 Apr 2025 14:16:13 +0800 Subject: [PATCH] fix: alignment issue of the add child record button in the tree table (#6791) --- .../schema-component/antd/action/Action.Link.tsx | 16 ---------------- .../components/CreateRecordAction.tsx | 2 +- 2 files changed, 1 insertion(+), 17 deletions(-) diff --git a/packages/core/client/src/schema-component/antd/action/Action.Link.tsx b/packages/core/client/src/schema-component/antd/action/Action.Link.tsx index b85cfb2549..6656bca46d 100644 --- a/packages/core/client/src/schema-component/antd/action/Action.Link.tsx +++ b/packages/core/client/src/schema-component/antd/action/Action.Link.tsx @@ -10,25 +10,9 @@ import { observer } from '@formily/react'; import classnames from 'classnames'; import React from 'react'; -import { Space, Tooltip } from 'antd'; import { withDynamicSchemaProps } from '../../../hoc/withDynamicSchemaProps'; import Action from './Action'; import { ComposedAction } from './types'; -import { Icon } from '../../../icon'; - -const WrapperComponent = React.forwardRef( - ({ component: Component = 'a', icon, onlyIcon, children, ...restProps }: any, ref) => { - return ( - - - {icon && typeof icon === 'string' ? : icon} - - {onlyIcon ? children[1] : children} - - ); - }, -); -WrapperComponent.displayName = 'WrapperComponentLink'; export const ActionLink: ComposedAction = withDynamicSchemaProps( observer((props: any) => { diff --git a/packages/core/client/src/schema-initializer/components/CreateRecordAction.tsx b/packages/core/client/src/schema-initializer/components/CreateRecordAction.tsx index 627aeaf7e3..81b015b5bc 100644 --- a/packages/core/client/src/schema-initializer/components/CreateRecordAction.tsx +++ b/packages/core/client/src/schema-initializer/components/CreateRecordAction.tsx @@ -357,7 +357,7 @@ function FinallyButton({ }} style={{ ...props?.style, - display: !designable && field?.data?.hidden && 'none', + display: !designable && field?.data?.hidden ? 'none' : 'inline-block', opacity: designable && field?.data?.hidden && 0.1, ...buttonStyle, }}