Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 [BUG] 侧面菜单折叠不起作用 #11421

Open
mxchinegod opened this issue Jan 11, 2025 · 1 comment
Open

🐛 [BUG] 侧面菜单折叠不起作用 #11421

mxchinegod opened this issue Jan 11, 2025 · 1 comment

Comments

@mxchinegod
Copy link

mxchinegod commented Jan 11, 2025

🐛 bug 描述

两个独立的项目,升级到 UMI4 后主菜单折叠按钮不起作用

📷 复现步骤 | Recurrence steps

可以在移动版本上测试,将浏览器窗口缩小以便于查看

🏞 期望结果 | Expected results

菜单通过单击折叠按钮打开和关闭

💻 复现代码 | Recurrence code

// defaultSettings.ts

import { ProLayoutProps } from '@ant-design/pro-components';

/**
 * @name
 */
const Settings: ProLayoutProps & {
  pwa?: boolean;
  logo?: string;
} = {
  navTheme: 'realDark',
  // 拂晓蓝
  colorPrimary: '#1890ff',
  layout: "side",
  pageTitleRender: false,
  fixedHeader: false,
  fixSiderbar: true,
  // menu: { defaultOpenAll: true },
  // collapsedButtonRender: true,
  pwa: true,
  logo: "/logo.png",
  token: {},
  splitMenus: false,
  colorWeak: false,
  title: 'Prism',
  collapsed: true,
  iconfontUrl: '',
};

export default Settings;

© 版本信息

    "@ant-design/pro-components": "^2.7.16",
    "@ant-design/pro-layout": "^7.22.0",

🚑 其他信息

这发生在两个不同的项目上,所以我一定做错了什么或者版本有错误

@mxchinegod
Copy link
Author

通过删除折叠的布尔值来修复。我认为这只是初始状态值,但它完全阻止了交互。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant