2 Star 4 Fork 1

沙屿沫 / vue-elemnt-admin

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

vue-element-admin

基于 https://github.com/PanJiaChen/vue-element-admin 二次开发

开发

# 克隆项目
git clone https://gitee.com/shayvmo/vue-elemnt-admin.git

# 进入项目目录
cd vue-element-admin

# 安装依赖
npm install

# 建议不要直接使用 cnpm 安装依赖,会有各种诡异的 bug。可以通过如下操作解决 npm 下载速度慢的问题
npm install --registry=https://registry.npm.taobao.org

# 启动服务
npm run dev

浏览器访问 http://localhost:9527

发布

# 构建测试环境
npm run build:stage

# 构建生产环境
npm run build:prod

其它

# 预览发布环境效果
npm run preview

# 预览发布环境效果 + 静态资源分析
npm run preview -- --report

# 代码格式检查
npm run lint

# 代码格式检查并自动修复
npm run lint -- --fix

菜单权限动态渲染

1、router.js 里面的菜单 roles 必须要与后端返回的角色对应,或 name 值对应后端返回的权限菜单对应,否则不渲染

2、超级管理员默认拥有全部权限,无需校验。

3、当菜单的 roles 留空时,不校验角色

【注意】

权限控制,如果使用v-if ,需要引入处理函数, 并export

<el-button v-if="checkPermission(['add-system-admin'])" size="mini" class="btn-add" style="margin-left: 20px" @click="handleAdd()">添加</el-button>
import checkPermission from '@/utils/permission'

开发文档

详情查看 docs 目录

MIT License Copyright (c) 2021 Eric Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

vue-element-admin新仓库,前端负责页面权限控制。当前版本也是后台管理部分的最新仓库 展开 收起
MIT
取消

发行版 (1)

全部

贡献者

全部

近期动态

加载更多
不能加载更多了
JavaScript
1
https://gitee.com/shayvmo/vue-elemnt-admin.git
git@gitee.com:shayvmo/vue-elemnt-admin.git
shayvmo
vue-elemnt-admin
vue-elemnt-admin
master

搜索帮助