Go to file
陈文彬 d455440304 refactor(button): 将button注册为全局组件,方便改造 2020-08-05 22:05:18 +08:00
.vscode chore(deps): update dep 2020-07-31 23:25:16 +08:00
build ci(mock): remove console 2020-08-05 10:27:41 +08:00
config ci(mock): fix dev mock error 2020-08-04 18:23:02 +08:00
docs/imgs chore(deps): update dep 2020-07-31 23:25:16 +08:00
mock ci(mock): fix dev mock error 2020-08-04 18:23:02 +08:00
public perf: 整体优化,加快页面切换速度 2020-07-29 20:03:10 +08:00
src refactor(button): 将button注册为全局组件,方便改造 2020-08-05 22:05:18 +08:00
tests/unit init: init 2020-07-11 10:34:12 +08:00
.browserslistrc init: init 2020-07-11 10:34:12 +08:00
.editorconfig init: init 2020-07-11 10:34:12 +08:00
.env feat(table): add table component and demo 2020-07-23 21:25:51 +08:00
.env.development perf: 整体优化,加快页面切换速度 2020-07-29 20:03:10 +08:00
.env.production feat(table): add table component and demo 2020-07-23 21:25:51 +08:00
.eslintignore init: init 2020-07-11 10:34:12 +08:00
.eslintrc.js fix(vac): fix vca plugins auto import onMounted onunMounted 2020-07-18 11:35:10 +08:00
.gitattributes init: init 2020-07-11 10:34:12 +08:00
.gitignore chore(deps): update dep 2020-07-31 23:25:16 +08:00
.ls-lint.yml ci: add ls-lint 2020-07-29 20:47:31 +08:00
.npmrc init: init 2020-07-11 10:34:12 +08:00
.prettierignore fix(vac): fix vca plugins auto import onMounted onunMounted 2020-07-18 11:35:10 +08:00
.stylelintignore init: init 2020-07-11 10:34:12 +08:00
.yarnclean init: init 2020-07-11 10:34:12 +08:00
CHANGELOG.md fix(table): 修复未使用useTable时候组件报错问题 2020-08-02 21:02:42 +08:00
LICENSE chore: add license 2020-07-23 23:45:00 +08:00
README-ES.md chore(deps): update dep 2020-07-31 23:25:16 +08:00
README.md feat(tree): new tree component 2020-08-05 21:03:22 +08:00
SECURITY.md Create SECURITY.md 2020-07-31 22:29:47 +08:00
babel.config.js perf: 整体优化,加快页面切换速度 2020-07-29 20:03:10 +08:00
commitlint.config.js feat: complete multi-mode rights management 2020-07-14 21:17:49 +08:00
jest.config.js init: init 2020-07-11 10:34:12 +08:00
lint-staged.config.js init: init 2020-07-11 10:34:12 +08:00
package.json refactor(button): 将button注册为全局组件,方便改造 2020-08-05 22:05:18 +08:00
postcss.config.js init: init 2020-07-11 10:34:12 +08:00
prettier.config.js init: init 2020-07-11 10:34:12 +08:00
stylelint.config.js init: init 2020-07-11 10:34:12 +08:00
tsconfig.json feat(img-crop): added img-crop demo 2020-07-22 22:49:34 +08:00
vue.config.js init: init 2020-07-11 10:34:12 +08:00
yarn.lock style(css-prefix): unified style prefix 2020-08-04 09:41:43 +08:00

README.md

VbenAdmin Logo

VUE VBEN ADMIN

中文 | English

一个适合开发中大型项目的基础框架,需要对vue,typescript有一定的了解,也可以作为了解新写法的一个例子来看,提前适应后续新版本的开发方式

项目基于ant-design-vue,typescript,vue-composition-api,TSX实现的 vue3 风格的后台管理系统,

兼容 vue2 的浏览器,一切免费,不收取任何费用,请放心使用。后续定期提供更新及维护,可供参考与学习

在线示例

在线预览

VbenAdmin Logo VbenAdmin Logo VbenAdmin Logo

gitHub 地址

vue-vben-admin

文档

文档未完全写完,还在陆续编写中...

在线文档

为什么写这个

目前在网上暂时没有找到相关的使用composition-api+typescript 写的后台系统,所以就把自己写的分享出来,后续会陆续加上新的功能,并且等vue3完全稳定的时候,会提供vue3版本,该项目后续切换 vue3 的成本相对较低,后续会做成一键版本切换

为什么要使用 vue-composition-api

最大的原因是我们还要兼容 ie11ie9ie10 可能需要自己修改 css 兼容性和部分插件的兼容性, vue3稳定下来最多也就支持ie11,所以暂时使用了vue-composition-api进行开发

使用到的技术

  • vue2.6.11(后续提供 vue3 版本)
  • composition-api:
  • vuex@3.4.0
  • vuex-module-decorators
  • vue-router@3.3.4
  • axios@0.19.2
  • ant-design-vue@1.6.3
  • mockjs
  • vue-i18n
  • moment
  • lodash

更新日志

环境要求

  • Node.js: >= v10
  • yarn: 最新

建议开发环境

  • Git: 最新 代码管理
  • Visual Studio Code (VSCode): 最新 IDE

VSCode 插件

  • Vetur: vue 开发必备
  • GitLens: Git 可视化工具
  • ESLint: 脚本代码检查
  • stylelint: 样式代码检查
  • Prettier - Code formatter:代码格式化

浏览器支持

支持现代浏览器及 IE10+

IE / Edge
IE / Edge
Firefox
Firefox
Chrome
Chrome
Safari
Safari
IE10, IE11, Edge last 2 versions last 2 versions last 2 versions

安装

git config core.ignorecase false # 使git对文件名大小写敏感

// 拉取项目代码

git clone https://github.com/anncwb/vue-vben-admin.git

cd vue-vben-admin

//  最好使用yarn否则热更新可能出现问题
yarn install

命令参考(Terminal)

启动开发环境

yarn serve

打包

同时会生成文件名 window-glob.js 配置文件,项目配置可以动态修改该文件实时更新代码变量,比如接口地址


yarn build # 打包 会使用hardSource进行打包

yarn build:no-cache # 打包 不会使用hardSource进行打包

yarn report # 生成构建包表表预览

单元测试

yarn test:unit # --watch : 跟踪文件变化

格式化

yarn lint:stylelint # 样式格式化

yarn lint:prettier # js/ts代码格式化

其他

yarn reinstall # 删除依赖重新装兼容window

yarn preview # 本地进行打包预览

yarn log # 生成CHANGELOG

Git 提交规范

  • 参考 vue 规范 (Angular)

    • feat 增加新功能
    • fix 修复问题/BUG
    • style 代码风格相关无影响运行结果的
    • perf 优化/性能提升
    • refactor 重构
    • revert 撤销修改
    • test 测试相关
    • docs 文档/注释
    • chore 依赖更新/脚手架配置修改等
    • workflow 工作流改进
    • ci 持续集成
    • mod 不确定分类的修改
    • wip 删除文件

目录结构

├── build # 构建任务相关
├── dist # 生成的部署文件目录
├── public # 静态文件目录
├── mock # 模拟数据目录
├── config # 项目构建配置文件
├── src # 源码目录
│   │── api # 接口
│   │── assets # 静态资源文件目录, 使用到的会被解析处理(比如图片等)
│   │── components # 提取的复用组件(文件夹分类, 未分类的基本就是基础组件了)
│   │── setting # 配置目录
│   │── enums # 枚举目录
│   │── common # 共用文件目录
│   │── router # 路由及菜单配置
│   │── design # 样式
│   │── hooks # vue3 组合式api
│   │── store # 状态管理
│   │   └── modules # 各模块状态管理
│   │── types # ts 接口/申明文件
│   │── utils # 工具集(业务无关, 一般为幂等函数/单例对象/Class...)
│   │── setup # 项目初始配置
│   └── views视图
├── tests # 测试用例目录
│   └── unit # unit 测试(jest): https://jestjs.io
├── ... # 其他配置文件
└── vue.config.js # 配置入口(vue cli)

代码贡献

  1. Fork 代码!
  2. 创建自己的分支: git checkout -b feat/xxxx
  3. 提交你的修改: git commit -am 'feat(function): add xxxxx'
  4. 推送您的分支: git push origin feat/xxxx
  5. 提交pull request

开发计划

由于开发时间较短,所以功能暂时较少

后续会逐步完善,有需要什么组件可以提出来

  • 项目搭建(基于 vue-cli4已经优化
  • 首屏加载等待动画
  • 登录和注销
  • 菜单(可以搜索及拖拽以及菜单布局)
  • 多标签页/面包屑
  • 基于角色的权限管理
  • 基于后台的权限管理
  • 分离的路由和菜单设置
  • 可折叠侧边栏
  • 可拖拽侧边栏
  • 多标签页模式/全局控制
  • 支持菜单 svg 图标
  • 菜单搜索
  • 页面加载 loading/页面超时组件
  • 滚动条组件
  • 懒加载组件
  • 弹窗扩展(可拖拽,全屏,自适应高度)
  • 全屏
  • 自动注册 SVG 图标
  • 模拟数据
  • 剪贴板封装
  • hook 封装
  • 图表库
  • 数字动画
  • 项目可配置
  • 主题配置
  • 表单组件
  • 右键菜单
  • 水印插件
  • 视差组件
  • 动画组件
  • 二维码插件
  • 国际化插件
  • 图片预览组件
  • 详情组件
  • 表格组件
  • 图片裁剪
  • 富文本组件
  • 上传组件
  • 错误日志
  • 拖拽面板
  • 验证码/验证组件
  • 数据导入导出
  • 树组件
  • 可编辑表格
  • 黑暗主题
  • 界面 ui 升级优化
  • 兼容最新vuex,vue-router,
  • 搭建vite版本
  • 更多组件/功能/建议/bug/欢迎提交 pr 或者 issue

加入我们

VUE-VBEN-ADMIN 是完全开源免费的项目,旨在帮助开发者更方便地进行中大型管理系统开发,同时也提供 QQ 交流群(项目刚起步,人数较少,有兴趣的可以加群一起讨论),使用问题欢迎在群内提问。

  • QQ 群 569291866
VbenAdmin Logo