fix: prevent horizontal scroll of menus (#1279)

This commit is contained in:
Dunqing 2022-12-23 15:07:37 +08:00 committed by GitHub
parent 90b2f1e859
commit bfc83372c6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 1 deletions

View File

@ -315,7 +315,10 @@ const SettingsCenter = (props) => {
`} `}
theme={'light'} theme={'light'}
> >
<Menu selectedKeys={[pluginName]} style={{ height: 'calc(100vh - 46px)', overflowY: 'auto' }}> <Menu
selectedKeys={[pluginName]}
style={{ height: 'calc(100vh - 46px)', overflowY: 'auto', overflowX: 'hidden' }}
>
{Object.keys(items) {Object.keys(items)
.sort() .sort()
.map((key) => { .map((key) => {

View File

@ -292,6 +292,7 @@ export const Menu: ComposedMenu = observer((props) => {
className={css` className={css`
height: 100%; height: 100%;
overflow-y: auto; overflow-y: auto;
overflow-x: hidden;
.ant-menu-item { .ant-menu-item {
> .ant-menu-title-content { > .ant-menu-title-content {
margin-left: -24px; margin-left: -24px;