fix: uischema i18n

This commit is contained in:
gchust 2025-06-28 21:23:53 +08:00
parent 05f5530232
commit cbbd4a1db8
4 changed files with 10 additions and 7 deletions

View File

@ -129,7 +129,7 @@ export const DefaultSettingsIcon: React.FC<DefaultSettingsIconProps> = ({
title: t('Confirm Delete'),
icon: <ExclamationCircleOutlined />,
content: t('Are you sure you want to delete this item? This action cannot be undone.'),
okText: t('Confirm Delete'),
okText: t('Confirm'),
okType: 'primary',
cancelText: t('Cancel'),
async onOk() {

View File

@ -14,6 +14,7 @@ import { FlowModel } from '../../../../models';
import { StepDefinition } from '../../../../types';
import { resolveDefaultParams, resolveUiSchema, compileUiSchema, getT } from '../../../../utils';
import { StepSettingContextProvider, StepSettingContextType, useStepSettingContext } from './StepSettingContext';
import { toJS } from '@formily/reactive';
/**
*
@ -174,8 +175,8 @@ const openRequiredParamsStepFormDialog = async ({
const resolvedStepUiSchema = await resolveUiSchema(stepUiSchema, paramsContext);
// 合并uiSchema确保step的uiSchema优先级更高
const mergedUiSchema = { ...resolvedActionUiSchema };
Object.entries(resolvedStepUiSchema).forEach(([fieldKey, schema]) => {
const mergedUiSchema = { ...toJS(resolvedActionUiSchema) };
Object.entries(toJS(resolvedStepUiSchema)).forEach(([fieldKey, schema]) => {
if (mergedUiSchema[fieldKey]) {
mergedUiSchema[fieldKey] = { ...mergedUiSchema[fieldKey], ...schema };
} else {

View File

@ -13,6 +13,7 @@ import React from 'react';
import { StepSettingsDialogProps } from '../../../../types';
import { resolveDefaultParams, resolveUiSchema, compileUiSchema, getT } from '../../../../utils';
import { StepSettingContextProvider, StepSettingContextType, useStepSettingContext } from './StepSettingContext';
import { toJS } from '@formily/reactive';
const SchemaField = createSchemaField();
@ -82,8 +83,8 @@ const openStepSettingsDialog = async ({
const resolvedStepUiSchema = await resolveUiSchema(stepUiSchema, paramsContext);
// 合并uiSchema确保step的uiSchema优先级更高
const mergedUiSchema = { ...resolvedActionUiSchema };
Object.entries(resolvedStepUiSchema).forEach(([fieldKey, schema]) => {
const mergedUiSchema = { ...toJS(resolvedActionUiSchema) };
Object.entries(toJS(resolvedStepUiSchema)).forEach(([fieldKey, schema]) => {
if (mergedUiSchema[fieldKey]) {
mergedUiSchema[fieldKey] = { ...mergedUiSchema[fieldKey], ...schema };
} else {

View File

@ -14,6 +14,7 @@ import { useTranslation } from 'react-i18next';
import { StepSettingsDrawerProps } from '../../../../types';
import { resolveDefaultParams, resolveUiSchema, compileUiSchema, getT } from '../../../../utils';
import { StepSettingContextProvider, StepSettingContextType, useStepSettingContext } from './StepSettingContext';
import { toJS } from '@formily/reactive';
const SchemaField = createSchemaField();
@ -82,8 +83,8 @@ const openStepSettingsDrawer = async ({
const resolvedStepUiSchema = await resolveUiSchema(stepUiSchema, paramsContext);
// 合并uiSchema确保step的uiSchema优先级更高
const mergedUiSchema = { ...resolvedActionUiSchema };
Object.entries(resolvedStepUiSchema).forEach(([fieldKey, schema]) => {
const mergedUiSchema = { ...toJS(resolvedActionUiSchema) };
Object.entries(toJS(resolvedStepUiSchema)).forEach(([fieldKey, schema]) => {
if (mergedUiSchema[fieldKey]) {
mergedUiSchema[fieldKey] = { ...mergedUiSchema[fieldKey], ...schema };
} else {