fix(client): build error
This commit is contained in:
parent
e2949362ba
commit
600f13f4a0
@ -1,8 +1,8 @@
|
||||
import { union } from 'lodash';
|
||||
import React from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { SchemaInitializer } from '../SchemaInitializer';
|
||||
import { gridRowColWrap, useAssociatedFormItemInitializerFields, useFormItemInitializerFields } from '../utils';
|
||||
import { union } from 'lodash';
|
||||
|
||||
// 表单里配置字段
|
||||
export const FormItemInitializers = (props: any) => {
|
||||
@ -14,20 +14,28 @@ export const FormItemInitializers = (props: any) => {
|
||||
<SchemaInitializer.Button
|
||||
wrap={gridRowColWrap}
|
||||
icon={'SettingOutlined'}
|
||||
items={union([
|
||||
items={union<any>(
|
||||
[
|
||||
{
|
||||
type: 'itemGroup',
|
||||
title: t('Display fields'),
|
||||
children: useFormItemInitializerFields(),
|
||||
}],
|
||||
associationFields.length > 0 ? [{
|
||||
},
|
||||
],
|
||||
associationFields.length > 0
|
||||
? [
|
||||
{
|
||||
type: 'divider',
|
||||
}, {
|
||||
},
|
||||
{
|
||||
type: 'itemGroup',
|
||||
title: t('Display association fields'),
|
||||
children: associationFields,
|
||||
}] : [],
|
||||
[{
|
||||
},
|
||||
]
|
||||
: [],
|
||||
[
|
||||
{
|
||||
type: 'divider',
|
||||
},
|
||||
{
|
||||
@ -45,7 +53,8 @@ export const FormItemInitializers = (props: any) => {
|
||||
},
|
||||
},
|
||||
},
|
||||
])}
|
||||
],
|
||||
)}
|
||||
insertPosition={insertPosition}
|
||||
component={component}
|
||||
title={component ? null : t('Configure fields')}
|
||||
|
@ -1,8 +1,8 @@
|
||||
import { union } from 'lodash';
|
||||
import React from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { SchemaInitializer } from '../SchemaInitializer';
|
||||
import { gridRowColWrap, useAssociatedFormItemInitializerFields, useFormItemInitializerFields } from '../utils';
|
||||
import { union } from 'lodash';
|
||||
|
||||
export const ReadPrettyFormItemInitializers = (props: any) => {
|
||||
const { t } = useTranslation();
|
||||
@ -13,20 +13,28 @@ export const ReadPrettyFormItemInitializers = (props: any) => {
|
||||
<SchemaInitializer.Button
|
||||
wrap={gridRowColWrap}
|
||||
icon={'SettingOutlined'}
|
||||
items={union([
|
||||
items={union<any>(
|
||||
[
|
||||
{
|
||||
type: 'itemGroup',
|
||||
title: t('Display fields'),
|
||||
children: useFormItemInitializerFields(),
|
||||
}],
|
||||
associationFields.length > 0 ? [{
|
||||
},
|
||||
],
|
||||
associationFields.length > 0
|
||||
? [
|
||||
{
|
||||
type: 'divider',
|
||||
}, {
|
||||
},
|
||||
{
|
||||
type: 'itemGroup',
|
||||
title: t('Display association fields'),
|
||||
children: associationFields,
|
||||
}] : [],
|
||||
[{
|
||||
},
|
||||
]
|
||||
: [],
|
||||
[
|
||||
{
|
||||
type: 'divider',
|
||||
},
|
||||
{
|
||||
@ -44,7 +52,8 @@ export const ReadPrettyFormItemInitializers = (props: any) => {
|
||||
},
|
||||
},
|
||||
},
|
||||
])}
|
||||
],
|
||||
)}
|
||||
insertPosition={insertPosition}
|
||||
component={component}
|
||||
title={component ? null : t('Configure fields')}
|
||||
|
Loading…
Reference in New Issue
Block a user