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