All Projects → hsl947 → React Antd Multi Tabs Admin

hsl947 / React Antd Multi Tabs Admin

Licence: mit
ts+react+antd-多页签后台模板(纯净版,非 antd pro!)

Programming Languages

typescript
32286 projects

Projects that are alternatives of or similar to React Antd Multi Tabs Admin

Ant Design Pro Plus
✨ 基于 ant-design-pro 做一些微小的工作。
Stars: ✭ 88 (+20.55%)
Mutual labels:  boilerplate, antd, tabs, dashboard, admin, admin-dashboard, ant-design
Ant Design Pro
👨🏻‍💻👩🏻‍💻 Use Ant Design like a Pro!
Stars: ✭ 30,909 (+42241.1%)
Mutual labels:  boilerplate, antd, dashboard, admin, ant-design
React Antd Admin
用React和Ant Design搭建的一个通用管理后台
Stars: ✭ 1,313 (+1698.63%)
Mutual labels:  antd, dashboard, admin, admin-dashboard, ant-design
Ant Design Vue Pro
👨🏻‍💻👩🏻‍💻 Use Ant Design Vue like a Pro!
Stars: ✭ 8,965 (+12180.82%)
Mutual labels:  antd, dashboard, admin, ant-design
Sing App
💥Free and open-source admin dashboard template built with Bootstrap 4.5 💥
Stars: ✭ 1,187 (+1526.03%)
Mutual labels:  boilerplate, dashboard, admin, admin-dashboard
Dva Boot Admin
🍰 react admin dashboard ui LANIF-ADMIN --- react 16 + react-router 4 + dva 2 + antd 4 后台管理 脚手架
Stars: ✭ 1,553 (+2027.4%)
Mutual labels:  boilerplate, admin, admin-dashboard, ant-design
Light Blue Dashboard
🔥 Free and open-source admin dashboard template built with Bootstrap
Stars: ✭ 110 (+50.68%)
Mutual labels:  boilerplate, dashboard, admin, admin-dashboard
Root Bootstrap 4 Admin Template With Angularjs Angular 2 Support
Root is Boostrap 4 Admin Template with Angular 2 and AngularJS support
Stars: ✭ 54 (-26.03%)
Mutual labels:  dashboard, admin, admin-dashboard
Ant Admin
基于 antd 的后台管理平台, 在 react 中玩转 D3.js
Stars: ✭ 455 (+523.29%)
Mutual labels:  antd, admin, admin-dashboard
React Redux Antdesign Webpack Starter
react + redux + ant design + react-router 4 + webpack 4 starter
Stars: ✭ 44 (-39.73%)
Mutual labels:  antd, less, ant-design
Antd Admin
An excellent front-end solution for enterprise applications built upon Ant Design and UmiJS
Stars: ✭ 8,678 (+11787.67%)
Mutual labels:  antd, dashboard, admin
Ngx Admin
Customizable admin dashboard template based on Angular 10+
Stars: ✭ 23,286 (+31798.63%)
Mutual labels:  dashboard, admin, admin-dashboard
Cleopatra
Admin Dashboard Template Built On Tailwind CSS
Stars: ✭ 521 (+613.7%)
Mutual labels:  dashboard, admin, admin-dashboard
Kongdash
An elegant desktop client for Kong Admin API
Stars: ✭ 449 (+515.07%)
Mutual labels:  dashboard, admin, admin-dashboard
Sleek Dashboard
Sleek Dashboard - Free Bootstrap 4 Admin Template and UI Kit
Stars: ✭ 690 (+845.21%)
Mutual labels:  dashboard, admin, admin-dashboard
Staradmin Free Bootstrap Admin Template
A Free Responsive Admin Dashboard Template Built With Bootstrap 4. Elegant UI Theme for Your Web App!
Stars: ✭ 1,191 (+1531.51%)
Mutual labels:  dashboard, admin, admin-dashboard
Bowtie
Create a dashboard with python!
Stars: ✭ 724 (+891.78%)
Mutual labels:  antd, dashboard, ant-design
Jet Bridge
Jet Bridge – Admin Panel Framework for your application
Stars: ✭ 904 (+1138.36%)
Mutual labels:  dashboard, admin, admin-dashboard
Viron
☕️ Automated Design-based Management Console.
Stars: ✭ 925 (+1167.12%)
Mutual labels:  dashboard, admin, admin-dashboard
Vue Admin Beautiful
🚀🚀🚀vue3 admin,vue3.0 admin,vue后台管理,vue-admin,vue3.0-admin,admin,vue-admin,vue-element-admin,ant-design,vue-admin-beautiful-pro,vab admin pro,vab admin plus主线版本基于element-plus、element-ui、ant-design-vue三者并行开发维护,同时支持电脑,手机,平板,切换分支查看不同的vue版本,element-plus版本已发布(vue3,vue3.0,vue,vue3.x,vue.js)
Stars: ✭ 10,968 (+14924.66%)
Mutual labels:  admin, admin-dashboard, ant-design

Antd Multi Tabs Admin

🛠️Antd多标签页后台管理模板🛠️
由于业务上有多页签需求,网上找了一圈,都是基于antd pro的模板,太重了,不喜欢😒。
于是自己从以前的框架上改造,搭了这么一个精简版框架,用得也舒服,原创🤪。

预览地址


特性

  • 📐: 代码规模:原创精简版脚手架,主张最少,不臃肿
  • 🚅: 追求前沿:全站使用 React Hooks 开发,抛弃 Class
  • 💎: 优雅美观:基于 Ant Design 体系精心设计
  • 🚀: 流行技术:使用 React/Redux/Antd 等前端前沿技术开发
  • 🎨: 主题样式:使用流行的暗黑模式主题,支持深/浅色主题切换

特点

  • 多 tab 页签➕右键菜单,提升效率
  • Redux 状态管理➕持久化
  • 封装实用 axios 请求
  • 动态链式面包屑导航
  • 菜单页面路由权限控制
  • less➕css module 样式隔离
  • 列表➕分页➕多选➕搜索联动组件
  • 可自定义 webpack 配置➕优化打包

近期规划

  • 集成单元测试 jest + enzyme,争取覆盖率100%💪🏻💪🏻(学习中🤫)

预览图


使用

使用命令行

$ npm install -g typescript
$ git clone https://github.com/hsl947/react-antd-multi-tabs-admin.git
$ yarn install
$ yarn start         # 访问 http://localhost:666

权限控制

如果不需要权限控制,可自行注释去掉权限功能。

# src/components/common/menu/index.tsx

// 创建可展开的第一级子菜单
const creatSubMenu = (data: any): JSX.Element => {
  // const menuItemList = []
  // data.routes.map((item: any) => {
  //   const arr = permission.filter((ele: any) => item.key === ele.code)
  //   if (arr.length > 0) {
  //     menuItemList.push(renderMenu(item))
  //   }
  //  return arr
  // })

  const menuItemList = data.routes.reduce(
    (prev: any, next: any) => [...prev, renderMenu(next)],
    []
  )

  return menuItemList.length > 0 ? (
    <SubMenu key={data.key} title={subMenuTitle(data)}>
      {menuItemList}
    </SubMenu>
  ) : null
}
# src/pages/container/index.tsx

// 检查权限
const checkAuth = (newPathname: string): boolean => {
  // 不需要检查权限的
  // if (noCheckAuth.includes(newPathname)) {
  //   return true
  // }
  // const { tabKey: currentKey } = getKeyName(newPathname)
  // return isAuthorized(currentKey)

  // 一定返回 true
  return !!newPathname
}

Redux 的使用说明

# 在/src/store/actionTypes/index.tsx 定义新字段,格式如下
export default {
  ...,
  SET_ACTION: {
    name: 'SET_ACTION',
    field: 'action'
  }
}

# 在/src/store/state/index.tsx 也定义新字段,格式如下
interface StoreState {
  ...;
  action: string;
}
const initState: StoreState = {
  ...,
  action: ''
}

# 在要使用的组件中
import { connect } from 'react-redux'
import * as actions from '@/store/actions'
export default connect(
  (state) => state,
  actions
)(ComponentName)

# 然后在 props 就有 setStoreData 属性,可用来 dispatch
setStoreData('SET_ACTION', '')

# 只需要定义 type 和 state,不需要写每个action,效率提高了木有有!!!

路由/菜单配置

# 所有路由写在 /src/route/routes.ts (包括菜单栏的路由)
  用于路由权限控制

# 左侧菜单路由写在 /src/config/menu.ts
  仅用于菜单栏展示

# 分两套的原因是,方便维护,如果不嫌麻烦,可以都写在 routes 里,用一个字段标识菜单路由即可

关于换肤配置

本框架是使用 less.js 实现动态切换主题,js文件在 /public/less.min.js

# 主题配置文件在 /public/color.less

引用了 antd 组件后,基本不需要自己额外自定义主题样式,因为主题文件里都有。
但是!!!
如果自己写了自定义组件,切换主题后样式显示不正常,
则需要自己在 color.less 底部添加深浅主题对应的样式,具体参考主题文件内额外配置。

支持环境

现代浏览器及 IE11。

IE / EdgeIE / Edge FirefoxFirefox ChromeChrome SafariSafari OperaOpera
IE11, Edge last 2 versions last 2 versions last 2 versions last 2 versions

参与贡献

我们非常欢迎你的贡献,你可以通过以下方式和我们一起共建 😃:

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].