fix: adjust menu icon spacing
This commit is contained in:
parent
011b1dc8e9
commit
9e6579c4e2
@ -5,7 +5,7 @@ import {
|
|||||||
Schema,
|
Schema,
|
||||||
SchemaExpressionScopeContext,
|
SchemaExpressionScopeContext,
|
||||||
useField,
|
useField,
|
||||||
useFieldSchema,
|
useFieldSchema
|
||||||
} from '@formily/react';
|
} from '@formily/react';
|
||||||
import { Menu as AntdMenu } from 'antd';
|
import { Menu as AntdMenu } from 'antd';
|
||||||
import React, { createContext, useContext, useEffect, useState } from 'react';
|
import React, { createContext, useContext, useEffect, useState } from 'react';
|
||||||
@ -203,7 +203,7 @@ export const Menu: ComposedMenu = observer((props) => {
|
|||||||
<AntdMenu
|
<AntdMenu
|
||||||
{...others}
|
{...others}
|
||||||
style={{
|
style={{
|
||||||
width: mode === 'mix' ? '100%' : undefined,
|
// width: mode === 'mix' ? '100%' : undefined,
|
||||||
}}
|
}}
|
||||||
className={css`
|
className={css`
|
||||||
.ant-menu-item:hover {
|
.ant-menu-item:hover {
|
||||||
@ -289,7 +289,7 @@ export const Menu: ComposedMenu = observer((props) => {
|
|||||||
right: 6px !important;
|
right: 6px !important;
|
||||||
}
|
}
|
||||||
> span.anticon {
|
> span.anticon {
|
||||||
margin-right: 15px !important;
|
margin-right: 10px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -328,7 +328,7 @@ Menu.Item = observer((props) => {
|
|||||||
return (
|
return (
|
||||||
<AntdMenu.Item {...others} key={schema.name} eventKey={schema.name} schema={schema}>
|
<AntdMenu.Item {...others} key={schema.name} eventKey={schema.name} schema={schema}>
|
||||||
<SortableItem className={designerCss}>
|
<SortableItem className={designerCss}>
|
||||||
<Icon type={icon} style={{ marginRight: 5 }} />
|
<Icon type={icon} />
|
||||||
<span
|
<span
|
||||||
className={css`
|
className={css`
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
@ -362,7 +362,7 @@ Menu.URL = observer((props) => {
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<SortableItem className={designerCss}>
|
<SortableItem className={designerCss}>
|
||||||
<Icon style={{ marginRight: 5 }} type={icon} />
|
<Icon type={icon} />
|
||||||
{field.title}
|
{field.title}
|
||||||
<Designer />
|
<Designer />
|
||||||
</SortableItem>
|
</SortableItem>
|
||||||
@ -386,7 +386,7 @@ Menu.SubMenu = observer((props) => {
|
|||||||
eventKey={schema.name}
|
eventKey={schema.name}
|
||||||
title={
|
title={
|
||||||
<SortableItem className={subMenuDesignerCss}>
|
<SortableItem className={subMenuDesignerCss}>
|
||||||
<Icon style={{ marginRight: 5 }} type={icon} />
|
<Icon type={icon} />
|
||||||
{field.title}
|
{field.title}
|
||||||
<Designer />
|
<Designer />
|
||||||
</SortableItem>
|
</SortableItem>
|
||||||
|
Loading…
Reference in New Issue
Block a user