fix: assign field values modal shuold support maskClosable

This commit is contained in:
katherinehhh 2024-03-11 16:52:14 +08:00
parent ef097bd450
commit ba2467c9bf
2 changed files with 4 additions and 13 deletions

View File

@ -167,7 +167,7 @@ export function AssignedFieldValues() {
<DefaultValueProvider isAllowToSetDefaultValue={() => false}> <DefaultValueProvider isAllowToSetDefaultValue={() => false}>
<SchemaSettingsActionModalItem <SchemaSettingsActionModalItem
title={t('Assign field values')} title={t('Assign field values')}
maskClosable={false} // maskClosable={false}
initialSchema={initialSchema} initialSchema={initialSchema}
initialValues={fieldSchema?.['x-action-settings']?.assignedValues} initialValues={fieldSchema?.['x-action-settings']?.assignedValues}
modalTip={tips[actionType]} modalTip={tips[actionType]}

View File

@ -1,22 +1,17 @@
import { ISchema, useField, useFieldSchema } from '@formily/react'; import { ISchema, useFieldSchema } from '@formily/react';
import { isValid, uid } from '@formily/shared'; import { isValid } from '@formily/shared';
import { import {
ActionDesigner, ActionDesigner,
DefaultValueProvider,
FlagProvider,
SchemaSettings, SchemaSettings,
SchemaSettingsActionModalItem,
SchemaSettingsItemGroup,
SchemaSettingsItemType, SchemaSettingsItemType,
SchemaSettingsModalItem, SchemaSettingsModalItem,
SchemaSettingsSelectItem, SchemaSettingsSelectItem,
AssignedFieldValues, AssignedFieldValues,
useCompile,
useDesignable, useDesignable,
useSchemaToolbar, useSchemaToolbar,
} from '@nocobase/client'; } from '@nocobase/client';
import { useTranslation } from 'react-i18next'; import { useTranslation } from 'react-i18next';
import React, { useCallback, useEffect, useState } from 'react'; import React from 'react';
function UpdateMode() { function UpdateMode() {
const { dn } = useDesignable(); const { dn } = useDesignable();
@ -135,10 +130,6 @@ const schemaSettingsItems: SchemaSettingsItemType[] = [
{ {
name: 'assignFieldValues', name: 'assignFieldValues',
Component: AssignedFieldValues, Component: AssignedFieldValues,
// useVisible() {
// const fieldSchema = useFieldSchema();
// return isValid(fieldSchema?.['x-action-settings']?.assignedValues);
// },
}, },
{ {
name: 'afterSuccess', name: 'afterSuccess',