Giter VIP home page Giter VIP logo

react-admin-2's Introduction

GitHub license code style: prettier GitHub last commit

标准后台管理系统解决方案
动态菜单配置,权限精确到按钮

what's this?

React+Redux 后台管理系统脚手架
React Hooks / Redux / Typescript

  • 非服务端渲染
  • 仿antd-pro外观,但没有使用dva和roadhog

Node版本

至少10.12.0, 因为@typescript-eslint 3.x这个插件需要

分支

  • Default: React hooks + Typescript
  • react-class : 原版 React Class, 无TS

构建 Start

yarn install       // 安装依赖模块
yarn start         // 运行开发环境,启动完成后访问 http://localhost:8888
yarn build         // 正式打包,生成最终代码
yarn dist          // 运行正式打包后的最终代码,启动完成后访问 http://localhost:8889
yarn distmac       // MacOS下运行正式打包后的最终代码, 启动完成后访问 http://localhost:8889

最近更新

  • 在写jest测试用例,还没弄完
  • (2020/04/09) hooks/typescript
  • 不再需要yarn dll
  • (2020/03/13 正在进行) 升到 antd4, 使用@rematch, 修改权限、菜单、角色后需更新用 户信息 ,Typescript,menu 的构建递归,添加权限/菜单的模态框需要加一个是否将该 权限/菜单赋予给某些角色
  • 把所有包版本都升级到了最新 React16.7,webpack4.29,babel7...
  • 去掉了一些鸡肋的东西,真正项目中基本都不会用到
  • 去掉了 css-module,感觉太不方便了

前后端分离,权限是怎么控制的

在数据库里存储着权限的信息,可以在页面里各种编辑。
但最终实现,仍然是在页面 里写死的,前端写在页面里的权限信息跟数据库里的信息一一对应就实现了权限控制 。
更好的方法除非是使用 SSR 服务端渲染,直接把权限注入到页面中,就像传统的 JSP 那样。

内置通用功能

用户管理 增删改查 分配角色
  角色管理 增删改查 分配菜单和权限
  权限管 理 增删改查
  菜单管理 增删改查

关系:权限 依附于 菜单 依附于 角色 依附于 用户

预览地址 Demo

https://isluo.com/work/admin/
账号:admin / user
密码:123456 / 123456

参考

react-luo: https://github.com/javaLuo/react-luo

react-admin-2's People

Contributors

javaluo avatar queen-liu avatar

Watchers

 avatar

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.