Merge branch 'fix/sub-form-context' into fix/association-appends

This commit is contained in:
katherinehhh 2023-05-11 17:44:30 +08:00
commit d6755794bf
12 changed files with 38 additions and 9 deletions

View File

@ -281,6 +281,9 @@ export default {
"Display association fields": "Display association fields",
"Display field title": "Display field title",
"Field component": "Field component",
"Allow multiple": "Allow multiple",
"Quick upload": "Quick upload",
"Select file": "Select file",
"Subtable": "Subtable",
"Subform": "Sub-form",
"Field mode":"Field mode",

View File

@ -554,6 +554,9 @@ export default {
"Edit block title": "ブロックタイトルを編集",
"Province/city/area name": "Province/city/area name",
"Field component": "フィールドコンポーネント",
"Allow multiple": "複数選択を許可する",
"Quick upload": "クイックアップロード",
"Select file": "ファイルを選択",
"Subtable": "サブテーブル",
"Subform": "サブフォーム",
"Sub-details":"サブリスト",

View File

@ -240,6 +240,9 @@ export default {
"Display association fields": "Exibir campos de associação",
"Display field title": "Exibir título do campo",
"Field component": "Componente de campo",
"Quick upload": "Upload rápido",
"Select file": "Selecionar arquivo",
"Allow multiple": "Permitir múltiplos",
"Subtable": "Subtabela",
"Subform": "Subformulário",
"Record picker": "Selecionador de registros",

View File

@ -492,6 +492,9 @@ export default {
"Edit block title": "Изменить заголовок блока",
"Province/city/area name": "Имя области/города/района",
"Field component": "Компонент поля",
"Allow multiple": "Разрешить множественный выбор",
"Quick upload": "Быстрая загрузка",
"Select file": "Выбрать файл",
"Subtable": "Подтаблица",
"Subform": "Подформа",
"Regular expression": "Образец",

View File

@ -491,6 +491,9 @@ export default {
"operater": "operatör",
"Province/city/area name": "Semt/şehir/bölge adı",
"Field component": "Alan bileşeni",
"Allow multiple": "Birden çok izin ver",
"Quick upload": "Hızlı yükleme",
"Select file": "Dosya seç",
"Subtable": "Alttablo",
"Subform": "Altform",
"Regular expression": "Model(Pattern)",

View File

@ -302,6 +302,9 @@ export default {
"Display association fields": "显示关联表的字段",
"Display field title": "显示字段标题",
"Field component": "字段组件",
"Allow multiple": "允许多选",
"Quick upload": "快速上传",
"Select file": "选择文件",
"Subtable": "子表格",
"Subform": "子表单",
"Sub-details":"子详情",

View File

@ -2,19 +2,21 @@ import { FormLayout } from '@formily/antd';
import { RecursionField, useField, useFieldSchema } from '@formily/react';
import React, { useEffect } from 'react';
import { CollectionProvider } from '../../../collection-manager';
import { useAssociationFieldContext, useInsertSchema } from './hooks';
import { useInsertSchema } from './hooks';
import { useCollectionManager } from '../../../';
import schema from './schema';
export const InternalNester = () => {
const field = useField();
const fieldSchema = useFieldSchema();
const insertNester = useInsertSchema('Nester');
const { options } = useAssociationFieldContext();
const { getCollectionJoinField } = useCollectionManager();
const collectionField = getCollectionJoinField(fieldSchema['x-collection-field']);
useEffect(() => {
insertNester(schema.Nester);
}, []);
return (
<CollectionProvider name={options.target}>
<CollectionProvider name={collectionField.target}>
<FormLayout layout={'vertical'}>
<RecursionField
onlyRenderProperties

View File

@ -501,7 +501,7 @@ AssociationSelect.Designer = function Designer() {
fieldSchema['x-component'] !== 'TableField' && (
<SchemaSettings.SwitchItem
key="multiple"
title={t('Multiple')}
title={t('Allow multiple')}
checked={
fieldSchema['x-component-props']?.multiple === undefined
? true

View File

@ -1,5 +1,5 @@
import { css } from '@emotion/css';
import { ArrayCollapse, FormLayout, FormItem as Item, ArrayItems } from '@formily/antd';
import { ArrayCollapse, ArrayItems, FormLayout, FormItem as Item } from '@formily/antd';
import { Field } from '@formily/core';
import { ISchema, Schema, observer, useField, useFieldSchema } from '@formily/react';
import { uid } from '@formily/shared';
@ -13,20 +13,20 @@ import {
Collection,
CollectionFieldOptions,
useCollection,
useCollectionFilterOptions,
useCollectionManager,
useSortFields,
useCollectionFilterOptions,
} from '../../../collection-manager';
import { isTitleField } from '../../../collection-manager/Configuration/CollectionFields';
import { GeneralSchemaDesigner, SchemaSettings, isPatternDisabled, isShowDefaultValue } from '../../../schema-settings';
import { VariableInput } from '../../../schema-settings/VariableInput/VariableInput';
import { FilterDynamicComponent } from '../table-v2/FilterDynamicComponent';
import { isVariable, parseVariables, useVariablesCtx } from '../../common/utils/uitls';
import { SchemaComponent } from '../../core';
import { removeNullCondition } from '../filter';
import { useCompile, useDesignable, useFieldModeOptions } from '../../hooks';
import { BlockItem } from '../block-item';
import { removeNullCondition } from '../filter';
import { HTMLEncode } from '../input/shared';
import { FilterDynamicComponent } from '../table-v2/FilterDynamicComponent';
import { isInvariable } from '../variable';
import { FilterFormDesigner } from './FormItem.FilterFormDesigner';
import { useEnsureOperatorsValid } from './SchemaSettingOptions';
@ -712,7 +712,7 @@ FormItem.Designer = function Designer() {
fieldSchema['x-component'] !== 'TableField' && (
<SchemaSettings.SwitchItem
key="multiple"
title={t('Multiple')}
title={t('Allow multiple')}
checked={
fieldSchema['x-component-props']?.multiple === undefined
? true

View File

@ -230,6 +230,9 @@
"Generated automatically if left blank": "Generated automatically if left blank",
"Display association fields": "Display association fields",
"Field component": "Field component",
"Allow multiple": "Allow multiple",
"Quick upload": "Quick upload",
"Select file": "Select file",
"Subtable": "Subtable",
"Subform": "Sub-form",
"Record picker": "Record picker",

View File

@ -214,6 +214,9 @@
"Generated automatically if left blank": "Gerado automaticamente se deixado em branco",
"Display association fields": "Exibir campos de associação",
"Field component": "Componente de campo",
"Quick upload": "Upload rápido",
"Select file": "Selecionar arquivo",
"Allow multiple": "Permitir múltiplos",
"Subtable": "Subtabela",
"Subform": "Subformulário",
"Record picker": "Selecionador de registro",

View File

@ -230,6 +230,9 @@
"Generated automatically if left blank": "留空时,自动生成中间表",
"Display association fields": "显示关联表的字段",
"Field component": "字段组件",
"Allow multiple": "允许多选",
"Quick upload": "快速上传",
"Select file": "选择文件",
"Subtable": "子表格",
"Subform": "子表单",
"Record picker": "数据选择器",