mirror of
https://github.com/nocobase/nocobase
synced 2024-11-15 14:56:00 +00:00
fix: hide add tab button
This commit is contained in:
parent
28fadf945d
commit
a403e22439
@ -163,53 +163,55 @@ export const Page = (props) => {
|
|||||||
}, 50);
|
}, 50);
|
||||||
}}
|
}}
|
||||||
tabBarExtraContent={
|
tabBarExtraContent={
|
||||||
<Button
|
dn.designable && (
|
||||||
className={css`
|
<Button
|
||||||
border-color: rgb(241, 139, 98) !important;
|
className={css`
|
||||||
color: rgb(241, 139, 98) !important;
|
border-color: rgb(241, 139, 98) !important;
|
||||||
`}
|
color: rgb(241, 139, 98) !important;
|
||||||
type={'dashed'}
|
`}
|
||||||
onClick={async () => {
|
type={'dashed'}
|
||||||
const values = await FormDialog(t('Add tab'), () => {
|
onClick={async () => {
|
||||||
return (
|
const values = await FormDialog(t('Add tab'), () => {
|
||||||
<SchemaComponentOptions scope={options.scope} components={{ ...options.components }}>
|
return (
|
||||||
<FormLayout layout={'vertical'}>
|
<SchemaComponentOptions scope={options.scope} components={{ ...options.components }}>
|
||||||
<SchemaComponent
|
<FormLayout layout={'vertical'}>
|
||||||
schema={{
|
<SchemaComponent
|
||||||
properties: {
|
schema={{
|
||||||
title: {
|
properties: {
|
||||||
title: t('Tab name'),
|
title: {
|
||||||
'x-component': 'Input',
|
title: t('Tab name'),
|
||||||
'x-decorator': 'FormItem',
|
'x-component': 'Input',
|
||||||
required: true,
|
'x-decorator': 'FormItem',
|
||||||
|
required: true,
|
||||||
|
},
|
||||||
|
icon: {
|
||||||
|
title: t('Icon'),
|
||||||
|
'x-component': 'IconPicker',
|
||||||
|
'x-decorator': 'FormItem',
|
||||||
|
},
|
||||||
},
|
},
|
||||||
icon: {
|
}}
|
||||||
title: t('Icon'),
|
/>
|
||||||
'x-component': 'IconPicker',
|
</FormLayout>
|
||||||
'x-decorator': 'FormItem',
|
</SchemaComponentOptions>
|
||||||
},
|
);
|
||||||
},
|
}).open({
|
||||||
}}
|
initialValues: {},
|
||||||
/>
|
});
|
||||||
</FormLayout>
|
const { title, icon } = values;
|
||||||
</SchemaComponentOptions>
|
dn.insertBeforeEnd({
|
||||||
);
|
type: 'void',
|
||||||
}).open({
|
title,
|
||||||
initialValues: {},
|
'x-icon': icon,
|
||||||
});
|
'x-component': 'Grid',
|
||||||
const { title, icon } = values;
|
'x-initializer': 'BlockInitializers',
|
||||||
dn.insertBeforeEnd({
|
properties: {},
|
||||||
type: 'void',
|
});
|
||||||
title,
|
}}
|
||||||
'x-icon': icon,
|
>
|
||||||
'x-component': 'Grid',
|
Add tab
|
||||||
'x-initializer': 'BlockInitializers',
|
</Button>
|
||||||
properties: {},
|
)
|
||||||
});
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
Add tab
|
|
||||||
</Button>
|
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
{fieldSchema.mapProperties((schema) => {
|
{fieldSchema.mapProperties((schema) => {
|
||||||
|
Loading…
Reference in New Issue
Block a user