All Projects → bailihuiyue → ant-design-pro-tabs

bailihuiyue / ant-design-pro-tabs

Licence: other
基于pro2.0/4.0制作的多标签版本,直接引入组件即可使用,十分方便

Programming Languages

javascript
184084 projects - #8 most used programming language
Less
1899 projects
EJS
674 projects

Labels

Projects that are alternatives of or similar to ant-design-pro-tabs

Choerodon Ui
An enterprise UI framework and react-based implementation.
Stars: ✭ 171 (+151.47%)
Mutual labels:  ant
flyway-ant
Flyway Ant tasks
Stars: ✭ 14 (-79.41%)
Mutual labels:  ant
up
UP - Ultimate Provisioner CLI
Stars: ✭ 43 (-36.76%)
Mutual labels:  ant
Vue Antd Admin
🐜 Ant Design Pro's implementation with Vue
Stars: ✭ 2,766 (+3967.65%)
Mutual labels:  ant
zero-admin-ui
基于Go-Zero + Ant Design Pro的前后端分离微服务管理系统的前端模块
Stars: ✭ 104 (+52.94%)
Mutual labels:  ant
iconsole-android
OpeniConsole connects to an iConsole+ fitness bike head unit over bluetooth.
Stars: ✭ 27 (-60.29%)
Mutual labels:  ant
Vue3 Ts Base
一个基于vue3+typescript+ant-design-vue 搭建的基础代码库,有完善的类型系统,帮助快速搭建 vue3 的基础代码架构。
Stars: ✭ 156 (+129.41%)
Mutual labels:  ant
pct
Build automation for OpenEdge ABL
Stars: ✭ 87 (+27.94%)
Mutual labels:  ant
jreleaser
🚀 Release projects quickly and easily with JReleaser
Stars: ✭ 736 (+982.35%)
Mutual labels:  ant
Android-System-Related-Charts
各种与Android系统相关的框架图、流程图
Stars: ✭ 52 (-23.53%)
Mutual labels:  ant
Forbidden Apis
Policeman's Forbidden API Checker
Stars: ✭ 216 (+217.65%)
Mutual labels:  ant
Umi Antd Pro
👻use umi conventional routing in Ant Design Pro 使用umi约定式路由多Tabs的Ant Design Pro(Antd Pro的实验项目)
Stars: ✭ 245 (+260.29%)
Mutual labels:  ant
fitparse-rs
Rust library to parse FIT formatted files
Stars: ✭ 20 (-70.59%)
Mutual labels:  ant
Pro Layout
easy use `Ant Design Vue` layout
Stars: ✭ 172 (+152.94%)
Mutual labels:  ant
antd-snippets
Ant-Design Snippets for VS Code
Stars: ✭ 37 (-45.59%)
Mutual labels:  ant
Fc Angular
快速搭建angular后台管理系统的admin template。Fast development platform based on angular8, ng.ant.design built multi-tab page background management system (continuous upgrade) ^_^
Stars: ✭ 171 (+151.47%)
Mutual labels:  ant
ant-ivy
Mirror of Apache Ant Ivy
Stars: ✭ 55 (-19.12%)
Mutual labels:  ant
loadkit
Java 资源加载器,充分拓展ClassLoader#getResources(name)的能力,实现递归加载,支持普通风格 / 包名风格 / ANT风格 / 正则风格路径的资源加载同时支持自定义过滤器,通常作为框架的基础类库。
Stars: ✭ 39 (-42.65%)
Mutual labels:  ant
Finite-State-Machines
Implementation of the algorithm in the C#. https://tproger.ru/translations/finite-state-machines-theory-and-implementation/
Stars: ✭ 13 (-80.88%)
Mutual labels:  ant
sagdevops-ci-assets
Software AG DevOps library to support assets CI (continuous integration) with webMethods 9.x and 10.0. Work together with https://github.com/SoftwareAG/webmethods-sample-project-layout
Stars: ✭ 23 (-66.18%)
Mutual labels:  ant

Ant Design Pro Tabs

大家想要的,带有tab标签的ant design pro 又叕来啦!!!

  • 代码已经重写,使用hooks进行开发,精力有限,只出了js版本,需要ts的同学把类型改成any就好了(手动捂脸)
  • 基于最新版ant-design-pro 4.0 (仍然保留2.3.0包版本组件,TabPages/old.js就是了)
  • 原汁原味,只添加了tab,其他均无修改
  • 保留完整权限,输入错误地址仍然可以显示403
  • 模块化代码,最低引入一个文件即可完成tab的添加
  • 利用sessionStorage,刷新页面仍显可以显示之前未关闭的标签,重新打开浏览器只会显示路由所在的标签
  • 刷新页面会提示信息无法被保存(可在window.onbeforeunload中修改,删除此行就可以屏蔽该功能)
  • 样式方面参考了:https://github.com/kuhami/react-ant
  • 类库使用:good-storage
  • TODO:1. 隐藏标签实现类vue的keep-alive
    2. 输入错误路由逻辑有点乱,待优化
  • BUG:
    1. 通过路由传参会找不到页面,从而报错
    2.由于pro4.0没有menuData传进来,渲染全靠props.routes渲染,所以国际化可能会有点问题,导致路由路径必须和国际化一直,比如路径是a/b/c,那么国际化必须写成menu:{a:{b:{c:"xxxxx"}}},否则会tab可能会显示不正常
    3.输入错误的路由时逻辑还有点小问题,待修复
    4.页签限制功能(maxTab),计算有时不准,待修复
    5.remberRefresh还有些问题,待修复
    如有其他问题请反馈,谢谢
  • 注意:

    由于框架原因,所有路由都是先走/然后跳转,所以每次tab也都会有一个/,显示为menu.,目前的方法是把这个标签display:none了

pro 4.0 使用方法:

  1. 复制src/components/TabPages文件夹到自己的项目当中 (或者npm i ant_design_pro_tabs)
  2. src/layouts/BasicLayout.js中引入该组件
  <Authorized authority={authorized.authority} noMatch={noMatch}>
    <TabPages {...props} maxTab="5" preventReload remberRefresh animated homePage="/dashboard/analysis" errorPage="/exception/404" /> 
  </Authorized>
    // 参数:
    // 1. maxTab="5"    标签开多了可能导致浏览器崩溃,设置一个最大数量,超出会提示
    // 2. remberRefresh 刷新页面也能记住之前打开的标签
    // 3. preventReload 刷新页面会提示
    // 4. homePage      主页url
    // 5. errorPage     错误页url
    // 6. animated      是否使用动画切换 Tabs

4.pro 2.0版本(old.js文件)

 <Content>
   {children} //注释此行,改为tab组件
   <TabPages {...this.props} homePageKey='/dashboard/home' errorPage={<NoAuth />} />
</Content>				// homePageKey就是项目首页的url地址
  1. 多标签的信息是存储在sessionStorage的AntTabs中,建议退出登录时清理一下,避免造成bug
  2. 有问题欢迎多交流,github不常在线,着急的话请发邮件或者加我QQ(同邮箱)
       
你的支持就是我最大的动力                扫个红包也是不错的
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].