fix: sub menu hide (#3168)
This commit is contained in:
parent
4665095372
commit
810ab3294d
@ -34,19 +34,19 @@ const useRelationFields = () => {
|
||||
.map((field) => {
|
||||
if (['hasOne', 'belongsTo'].includes(field.type)) {
|
||||
return {
|
||||
key: field.name,
|
||||
name: field.name,
|
||||
type: 'subMenu',
|
||||
title: field?.uiSchema?.title || field.name,
|
||||
children: [
|
||||
{
|
||||
key: `${field.name}_details`,
|
||||
name: `${field.name}_details`,
|
||||
type: 'item',
|
||||
title: '{{t("Details")}}',
|
||||
field,
|
||||
Component: 'RecordReadPrettyAssociationFormBlockInitializer',
|
||||
},
|
||||
// {
|
||||
// key: `${field.name}_form`,
|
||||
// name: `${field.name}_form`,
|
||||
// type: 'item',
|
||||
// title: '{{t("Form")}}',
|
||||
// field,
|
||||
@ -58,47 +58,47 @@ const useRelationFields = () => {
|
||||
|
||||
if (['hasMany', 'belongsToMany'].includes(field.type)) {
|
||||
return {
|
||||
key: field.name,
|
||||
name: field.name,
|
||||
type: 'subMenu',
|
||||
title: field?.uiSchema?.title || field.name,
|
||||
children: [
|
||||
{
|
||||
key: `${field.name}_table`,
|
||||
name: `${field.name}_table`,
|
||||
type: 'item',
|
||||
title: '{{t("Table")}}',
|
||||
field,
|
||||
Component: 'RecordAssociationBlockInitializer',
|
||||
},
|
||||
{
|
||||
key: `${field.name}_details`,
|
||||
name: `${field.name}_details`,
|
||||
type: 'item',
|
||||
title: '{{t("Details")}}',
|
||||
field,
|
||||
Component: 'RecordAssociationDetailsBlockInitializer',
|
||||
},
|
||||
{
|
||||
key: `${field.name}_list`,
|
||||
name: `${field.name}_list`,
|
||||
type: 'item',
|
||||
title: '{{t("List")}}',
|
||||
field,
|
||||
Component: 'RecordAssociationListBlockInitializer',
|
||||
},
|
||||
{
|
||||
key: `${field.name}_grid_card`,
|
||||
name: `${field.name}_grid_card`,
|
||||
type: 'item',
|
||||
title: '{{t("Grid Card")}}',
|
||||
field,
|
||||
Component: 'RecordAssociationGridCardBlockInitializer',
|
||||
},
|
||||
{
|
||||
key: `${field.name}_form`,
|
||||
name: `${field.name}_form`,
|
||||
type: 'item',
|
||||
title: '{{t("Form")}}',
|
||||
field,
|
||||
Component: 'RecordAssociationFormBlockInitializer',
|
||||
},
|
||||
{
|
||||
key: `${field.name}_calendar`,
|
||||
name: `${field.name}_calendar`,
|
||||
type: 'item',
|
||||
title: '{{t("Calendar")}}',
|
||||
field,
|
||||
@ -109,7 +109,7 @@ const useRelationFields = () => {
|
||||
}
|
||||
|
||||
return {
|
||||
key: field.name,
|
||||
name: field.name,
|
||||
type: 'item',
|
||||
field,
|
||||
title: field?.uiSchema?.title || field.name,
|
||||
@ -125,7 +125,6 @@ const useDetailCollections = (props) => {
|
||||
const detailCollections = [
|
||||
{
|
||||
name: collection.name,
|
||||
key: collection.name,
|
||||
type: 'item',
|
||||
title: collection?.title || collection.name,
|
||||
Component: 'RecordReadPrettyFormBlockInitializer',
|
||||
@ -137,7 +136,6 @@ const useDetailCollections = (props) => {
|
||||
childrenCollections.map((c) => {
|
||||
return {
|
||||
name: c.name,
|
||||
key: c.name,
|
||||
type: 'item',
|
||||
title: c?.title || c.name,
|
||||
Component: 'RecordReadPrettyFormBlockInitializer',
|
||||
@ -155,7 +153,6 @@ const useFormCollections = (props) => {
|
||||
const formCollections = [
|
||||
{
|
||||
name: collection.name,
|
||||
key: collection.name,
|
||||
type: 'item',
|
||||
title: collection?.title || collection.name,
|
||||
Component: 'RecordFormBlockInitializer',
|
||||
@ -167,7 +164,6 @@ const useFormCollections = (props) => {
|
||||
childrenCollections.map((c) => {
|
||||
return {
|
||||
name: c.name,
|
||||
key: c.name,
|
||||
type: 'item',
|
||||
title: c?.title || c.name,
|
||||
Component: 'RecordFormBlockInitializer',
|
||||
|
Loading…
Reference in New Issue
Block a user