Code Monkey home page Code Monkey logo

admin-antd-react's Issues

登录后权限身份返回菜单列表不匹配

用户是admin身份

这里读取routes权限返回还是user身份的list数据,只有刷新网页才会返回admin身份的list数据
/src/layouts/IndexLayout/index.tsx

  useEffect(() => {
    console.log(userRoles); // 'admin'
    setMenuData(getPermissionMenuData(roles, IndexLayoutRoutes))
  }, [userRoles])

roles: ['admin'] 第三级权限的不会返回出来
/src/layouts/IndexLayout/routes.ts

const IndexLayoutRoutes: RoutesDataItem[] = [
  {
    title: 'index-layout.menu.home',
    path: '/home',
    redirect: '/home/test',
    roles: ['admin', 'user'],
    routes: [
      {
        icon: 'test',
        title: 'index-layout.menu.home.title',
        path: 'test',
        redirect: '/home/test/index',
        roles: ['admin', 'user'],
        routes: [
          {
            title: 'index-layout.menu.home.index',
            path: 'index',
            component: '@/pages/index',
            roles: ['admin', 'user'],
          },
          {
            title: 'index-layout.menu.home.third',
            path: 'third',
            component: '@/pages/third',
            roles: ['admin'],
          }
        ]
      }
    ]
  }
]

重新回来标签页后的页面上的数据不见了

您好,当打开多个标签页后,在其中一个标签页随便输入一些数据,然后打开其他标签页,然后再回来第1个标签页,之前输入的数据不见了。要如何解决这个问题呢?谢谢。

不支持动态路由

RightTabNav 不识别动态路由。
比如我添加一个路由 /users/show/:id ,然后进入到页面 /users/show/1 ,RightTabNav 没有识别出来,不会显示新的 Tab。

有升级到antd5打算吗

我改了一下,直接升级到antd5.6编译tree控件过不去
框架我改成tab形式,希望作者升级到antd5

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.