mirror of
https://github.com/nocobase/nocobase
synced 2024-11-15 14:26:36 +00:00
fix: sidebar menu text overflow (#3626)
This commit is contained in:
parent
bcb445644c
commit
d3627c5ba9
@ -27,8 +27,19 @@ export const SchemaInitializerButton: FC<SchemaInitializerButtonProps> = React.m
|
|||||||
}}
|
}}
|
||||||
icon={typeof options.icon === 'string' ? <Icon type={options.icon as string} /> : options.icon}
|
icon={typeof options.icon === 'string' ? <Icon type={options.icon as string} /> : options.icon}
|
||||||
{...others}
|
{...others}
|
||||||
|
>
|
||||||
|
<span
|
||||||
|
style={{
|
||||||
|
overflow: 'hidden',
|
||||||
|
textOverflow: 'ellipsis',
|
||||||
|
whiteSpace: 'nowrap',
|
||||||
|
display: 'inline-block',
|
||||||
|
width: options.icon ? 'calc(100% - 14px)' : '100%',
|
||||||
|
verticalAlign: 'bottom',
|
||||||
|
}}
|
||||||
>
|
>
|
||||||
{compile(options.title)}
|
{compile(options.title)}
|
||||||
|
</span>
|
||||||
</Button>
|
</Button>
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
@ -8,6 +8,9 @@ export const menuItemInitializer = new SchemaInitializer({
|
|||||||
insertPosition: 'beforeEnd',
|
insertPosition: 'beforeEnd',
|
||||||
icon: 'PlusOutlined',
|
icon: 'PlusOutlined',
|
||||||
title: '{{t("Add menu item")}}',
|
title: '{{t("Add menu item")}}',
|
||||||
|
style: {
|
||||||
|
width: '100%',
|
||||||
|
},
|
||||||
items: [
|
items: [
|
||||||
{
|
{
|
||||||
name: 'group',
|
name: 'group',
|
||||||
|
Loading…
Reference in New Issue
Block a user