From 7aa4d35c1af7f3a780b370d8b1b44aac01697be3 Mon Sep 17 00:00:00 2001 From: Rain <958414905@qq.com> Date: Thu, 21 Sep 2023 21:53:53 +0800 Subject: [PATCH] chore: associationFilter.Item designer --- .../association-filter/AssociationFilter.Item.tsx | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/packages/core/client/src/schema-component/antd/association-filter/AssociationFilter.Item.tsx b/packages/core/client/src/schema-component/antd/association-filter/AssociationFilter.Item.tsx index 22b07a13d0..f21e87e573 100644 --- a/packages/core/client/src/schema-component/antd/association-filter/AssociationFilter.Item.tsx +++ b/packages/core/client/src/schema-component/antd/association-filter/AssociationFilter.Item.tsx @@ -4,7 +4,7 @@ import { Col, Collapse, Input, Row, Tree } from 'antd'; import cls from 'classnames'; import React, { ChangeEvent, MouseEvent, useMemo, useState } from 'react'; import { SortableItem } from '../../common'; -import { useCompile, useDesigner, useProps } from '../../hooks'; +import { useCompile, useDesigner, useDesignerControl, useProps } from '../../hooks'; import { useToken } from '../__builtins__'; import { EllipsisWithTooltip } from '../input'; import { getLabelFormatValue, useLabelUiSchema } from '../record-picker'; @@ -21,6 +21,7 @@ export const AssociationFilterItem = (props) => { // 把一些可定制的状态通过 hook 提取出去了,为了兼容之前添加的 Table 区块,这里加了个默认值 const fieldSchema = useFieldSchema(); const Designer = useDesigner(); + const { designerVisible, showDesigner, hideDesigner } = useDesignerControl(); const compile = useCompile(); const { list, @@ -90,8 +91,12 @@ export const AssociationFilterItem = (props) => { const title = fieldSchema.title ?? collectionField?.uiSchema?.title; return wrapSSR( - - + + {designerVisible ? : null} null : undefined}>