diff --git a/packages/core/client/src/schema-component/antd/association-field/AssociationSelect.tsx b/packages/core/client/src/schema-component/antd/association-field/AssociationSelect.tsx index 7293655d0b..68badafc25 100644 --- a/packages/core/client/src/schema-component/antd/association-field/AssociationSelect.tsx +++ b/packages/core/client/src/schema-component/antd/association-field/AssociationSelect.tsx @@ -52,7 +52,6 @@ const InternalAssociationSelect = observer( // 因为通过 Schema 的形式书写的组件,在值变更的时候 `value` 的值没有改变,所以需要维护一个 `innerValue` 来变更值 const [innerValue, setInnerValue] = useState(value); const addMode = fieldSchema['x-component-props']?.addMode; - const isAllowAddNew = fieldSchema['x-add-new']; const { t } = useTranslation(); const { multiple } = props; const form = useForm(); @@ -133,7 +132,7 @@ const InternalAssociationSelect = observer( CustomDropdownRender={addMode === 'quickAdd' && QuickAddContent} > - {(addMode === 'modalAdd' || isAllowAddNew) && ( + {addMode === 'modalAdd' && ( {/* 快捷添加按钮添加的添加的是一个普通的 form 区块(非关系区块),不应该与任何字段有关联,所以在这里把字段相关的上下文给清除掉 */} diff --git a/packages/core/client/src/schema-component/antd/association-field/InternalPicker.tsx b/packages/core/client/src/schema-component/antd/association-field/InternalPicker.tsx index 73155248bd..cc50cd0397 100644 --- a/packages/core/client/src/schema-component/antd/association-field/InternalPicker.tsx +++ b/packages/core/client/src/schema-component/antd/association-field/InternalPicker.tsx @@ -1,5 +1,5 @@ import { observer, RecursionField, useField, useFieldSchema } from '@formily/react'; -import { Input, Select } from 'antd'; +import { Input, Select, Space } from 'antd'; import { differenceBy, unionBy } from 'lodash'; import React, { useContext, useMemo, useState } from 'react'; import { @@ -139,7 +139,7 @@ export const InternalPicker = observer( }; return ( <> - +