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] umijs4版本左侧菜单折叠后再打开 submenu动画有残影 #12401

Closed
wangchaoHeart opened this issue May 16, 2024 · 1 comment
Closed

Comments

@wangchaoHeart
Copy link

What happens?

当左侧菜单有子菜单且当前路由处在子菜单,折叠菜单再打开就会出现动画残影

Mini Showcase Repository(REQUIRED)

直接用umijs max 官方脚手架搭建并加一个拥有子路由的路由即可复现,以下是可复现仓库
仓库地址:https://github.com/wangchaoHeart/umijs4_collapsed_bug

以下是路由

  routes: [
    {
      path: '/',
      redirect: '/home',
    },
    {
      name: '首页',
      path: '/home',
      component: './Home',
    },
    {
      name: '权限演示',
      path: '/access',
      component: './Access',
      routes: [
        {
          name: '权限演示1',
          path: '/access/access1',
          component: './Access',
        },
        {
          name: '权限演示2',
          path: '/access/access2',
          component: './Access',
        },
      ],
    },
    {
      name: '页面3',
      path: '/homse',
      component: './Home',
    },
    {
      name: ' CRUD 示例',
      path: '/table',
      component: './Table',
    },
  ],

How To Reproduce

点击菜单 权限演示1,然后折叠菜单,再打开菜单即可看到 权限演示1和权限演示2菜单有残影(可反复点击查看这个bug)
1111111117777771

Context

  • Umi Version:@umijs/max 4.2.5 当前最新版
  • Node Version: 20.10.0
  • Platform:window11
@fz6m
Copy link
Member

fz6m commented May 18, 2024

我记得很久以前还有一个人也提过一个类似的问题,现在 max 里自带的 layout 功能用的是 ProLayout 这个组件,依赖是 @ant-design/pro-components ,要不就去给它提 PR 修复;

要不就自己写一个 layout ,参考 ./src/.umi/plugin-layout/Layout.tsx ,然后关闭默认自带的 layout:{}

要不就不在意它,因为这个细节不是鸡蛋里挑骨头里的看的话基本上观察不到,在我的电脑上是没有这个问题的,可能和电脑性能有关。

@fz6m fz6m closed this as completed May 18, 2024
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

2 participants