lqsong / admin-antd-react Goto Github PK
View Code? Open in Web Editor NEWReact + Ant Design Admin template
Home Page: http://admin-antd-react.liqingsong.cc
License: MIT License
React + Ant Design Admin template
Home Page: http://admin-antd-react.liqingsong.cc
License: MIT License
用户是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'],
}
]
}
]
}
]
你好,我如果加个全局的store在哪个地方加?
您好,当打开多个标签页后,在其中一个标签页随便输入一些数据,然后打开其他标签页,然后再回来第1个标签页,之前输入的数据不见了。要如何解决这个问题呢?谢谢。
RightTabNav 不识别动态路由。
比如我添加一个路由 /users/show/:id
,然后进入到页面 /users/show/1
,RightTabNav 没有识别出来,不会显示新的 Tab。
我改了一下,直接升级到antd5.6编译tree控件过不去
框架我改成tab形式,希望作者升级到antd5
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.