|
@ -9,7 +9,7 @@
|
||||||
|
|
||||||
## Introduction
|
## Introduction
|
||||||
|
|
||||||
vue-element-plus-admin is a free and open source middle and background template based on `element-plus`. Developed using the latest mainstream technologies such as `vue3`, `vite2` and `typescript`, the out of the box middle and background front-end solution can be used as the starting template of the project and learning reference. And always pay attention to the latest technological trends and update them as soon as possible.
|
vue-element-plus-admin is a free and open source middle and background template based on `element-plus`. Developed using the latest mainstream technologies such as `vue3`, `vite3` and `typescript`, the out of the box middle and background front-end solution can be used as the starting template of the project and learning reference. And always pay attention to the latest technological trends and update them as soon as possible.
|
||||||
|
|
||||||
vue-element-plus-admin is positioned as a background integration scheme, which is not suitable for secondary development as a basic template. Because it integrates many functions that you may not use, it will cause a lot of code redundancy. If your project doesn't pay attention to this problem, you can also directly carry out secondary development based on it.
|
vue-element-plus-admin is positioned as a background integration scheme, which is not suitable for secondary development as a basic template. Because it integrates many functions that you may not use, it will cause a lot of code redundancy. If your project doesn't pay attention to this problem, you can also directly carry out secondary development based on it.
|
||||||
|
|
||||||
|
@ -17,7 +17,7 @@ If you need a basic template, please switch to the `tempalte` branch. `Tempalte`
|
||||||
|
|
||||||
## Feature
|
## Feature
|
||||||
|
|
||||||
- **State of The Art Development**:Use front-end front-end technology development such as Vue3/vite2
|
- **State of The Art Development**:Use front-end front-end technology development such as Vue3/vite3
|
||||||
- **TypeScript**: Application-level JavaScript language
|
- **TypeScript**: Application-level JavaScript language
|
||||||
- **Theming**: Configurable themes
|
- **Theming**: Configurable themes
|
||||||
- **International**:Built-in complete internationalization program
|
- **International**:Built-in complete internationalization program
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
|
|
||||||
## 介绍
|
## 介绍
|
||||||
|
|
||||||
vue-element-plus-admin 是一个基于 `element-plus` 免费开源的中后台模版。使用了最新的`vue3`,`vite2`,`TypeScript`等主流技术开发,开箱即用的中后台前端解决方案,可以用来作为项目的启动模版,也可用于学习参考。并且时刻关注着最新技术动向,尽可能的第一时间更新。
|
vue-element-plus-admin 是一个基于 `element-plus` 免费开源的中后台模版。使用了最新的`vue3`,`vite3`,`TypeScript`等主流技术开发,开箱即用的中后台前端解决方案,可以用来作为项目的启动模版,也可用于学习参考。并且时刻关注着最新技术动向,尽可能的第一时间更新。
|
||||||
|
|
||||||
vue-element-plus-admin 的定位是后台集成方案,不太适合当基础模板来进行二次开发。因为集成了很多你可能用不到的功能,会造成不少的代码冗余。如果你的项目不关注这方面的问题,也可以直接基于它进行二次开发。
|
vue-element-plus-admin 的定位是后台集成方案,不太适合当基础模板来进行二次开发。因为集成了很多你可能用不到的功能,会造成不少的代码冗余。如果你的项目不关注这方面的问题,也可以直接基于它进行二次开发。
|
||||||
|
|
||||||
|
@ -17,7 +17,7 @@ vue-element-plus-admin 的定位是后台集成方案,不太适合当基础模
|
||||||
|
|
||||||
## 特性
|
## 特性
|
||||||
|
|
||||||
- **最新技术栈**:使用 Vue3/vite2 等前端前沿技术开发
|
- **最新技术栈**:使用 Vue3/vite3 等前端前沿技术开发
|
||||||
- **TypeScript**: 应用程序级 JavaScript 的语言
|
- **TypeScript**: 应用程序级 JavaScript 的语言
|
||||||
- **主题**: 可配置的主题
|
- **主题**: 可配置的主题
|
||||||
- **国际化**:内置完善的国际化方案
|
- **国际化**:内置完善的国际化方案
|
||||||
|
|
|
@ -10,18 +10,21 @@ const List: {
|
||||||
password: string
|
password: string
|
||||||
role: string
|
role: string
|
||||||
roleId: string
|
roleId: string
|
||||||
|
permissions: string | string[]
|
||||||
}[] = [
|
}[] = [
|
||||||
{
|
{
|
||||||
username: 'admin',
|
username: 'admin',
|
||||||
password: 'admin',
|
password: 'admin',
|
||||||
role: 'admin',
|
role: 'admin',
|
||||||
roleId: '1'
|
roleId: '1',
|
||||||
|
permissions: ['*.*.*']
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
username: 'test',
|
username: 'test',
|
||||||
password: 'test',
|
password: 'test',
|
||||||
role: 'test',
|
role: 'test',
|
||||||
roleId: '2'
|
roleId: '2',
|
||||||
|
permissions: ['example:dialog:create', 'example:dialog:delete']
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
24
package.json
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"name": "vue-element-plus-admin",
|
"name": "vue-element-plus-admin",
|
||||||
"version": "1.5.4",
|
"version": "1.5.4",
|
||||||
"description": "一套基于vue3、element-plus、typesScript、vite2的后台集成方案。",
|
"description": "一套基于vue3、element-plus、typesScript、vite3的后台集成方案。",
|
||||||
"author": "Archer <502431556@qq.com>",
|
"author": "Archer <502431556@qq.com>",
|
||||||
"private": false,
|
"private": false,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
@ -27,17 +27,16 @@
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@iconify/iconify": "^2.2.1",
|
"@iconify/iconify": "^2.2.1",
|
||||||
"@vueuse/core": "^8.9.3",
|
"@vueuse/core": "^8.9.4",
|
||||||
"@wangeditor/editor": "^5.1.9",
|
"@wangeditor/editor": "^5.1.10",
|
||||||
"@wangeditor/editor-for-vue": "^5.1.10",
|
"@wangeditor/editor-for-vue": "^5.1.10",
|
||||||
"@zxcvbn-ts/core": "^2.0.1",
|
"@zxcvbn-ts/core": "^2.0.3",
|
||||||
"animate.css": "^4.1.1",
|
"animate.css": "^4.1.1",
|
||||||
"axios": "^0.27.2",
|
"axios": "^0.27.2",
|
||||||
"echarts": "^5.3.3",
|
"echarts": "^5.3.3",
|
||||||
"echarts-wordcloud": "^2.0.0",
|
"echarts-wordcloud": "^2.0.0",
|
||||||
"element-plus": "2.2.9",
|
"element-plus": "2.2.9",
|
||||||
"intro.js": "^6.0.0",
|
"intro.js": "^6.0.0",
|
||||||
"js-md5": "^0.7.3",
|
|
||||||
"lodash-es": "^4.17.21",
|
"lodash-es": "^4.17.21",
|
||||||
"mitt": "^3.0.0",
|
"mitt": "^3.0.0",
|
||||||
"mockjs": "^1.1.0",
|
"mockjs": "^1.1.0",
|
||||||
|
@ -56,22 +55,21 @@
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@commitlint/cli": "^17.0.3",
|
"@commitlint/cli": "^17.0.3",
|
||||||
"@commitlint/config-conventional": "^17.0.3",
|
"@commitlint/config-conventional": "^17.0.3",
|
||||||
"@iconify/json": "^2.1.78",
|
"@iconify/json": "^2.1.79",
|
||||||
"@intlify/vite-plugin-vue-i18n": "^5.0.0",
|
"@intlify/vite-plugin-vue-i18n": "^5.0.0",
|
||||||
"@purge-icons/generated": "^0.8.1",
|
"@purge-icons/generated": "^0.8.1",
|
||||||
"@types/intro.js": "^5.1.0",
|
"@types/intro.js": "^5.1.0",
|
||||||
"@types/js-md5": "^0.4.3",
|
|
||||||
"@types/lodash-es": "^4.17.6",
|
"@types/lodash-es": "^4.17.6",
|
||||||
"@types/node": "^18.0.5",
|
"@types/node": "^18.0.6",
|
||||||
"@types/nprogress": "^0.2.0",
|
"@types/nprogress": "^0.2.0",
|
||||||
"@types/qrcode": "^1.4.2",
|
"@types/qrcode": "^1.4.2",
|
||||||
"@types/qs": "^6.9.7",
|
"@types/qs": "^6.9.7",
|
||||||
"@typescript-eslint/eslint-plugin": "^5.30.6",
|
"@typescript-eslint/eslint-plugin": "^5.30.6",
|
||||||
"@typescript-eslint/parser": "^5.30.6",
|
"@typescript-eslint/parser": "^5.30.6",
|
||||||
"@vitejs/plugin-vue": "^3.0.0",
|
"@vitejs/plugin-vue": "^3.0.1",
|
||||||
"@vitejs/plugin-vue-jsx": "^2.0.0",
|
"@vitejs/plugin-vue-jsx": "^2.0.0",
|
||||||
"autoprefixer": "^10.4.7",
|
"autoprefixer": "^10.4.7",
|
||||||
"eslint": "^8.19.0",
|
"eslint": "^8.20.0",
|
||||||
"eslint-config-prettier": "^8.5.0",
|
"eslint-config-prettier": "^8.5.0",
|
||||||
"eslint-define-config": "^1.5.1",
|
"eslint-define-config": "^1.5.1",
|
||||||
"eslint-plugin-prettier": "^4.2.1",
|
"eslint-plugin-prettier": "^4.2.1",
|
||||||
|
@ -94,7 +92,7 @@
|
||||||
"stylelint-order": "^5.0.0",
|
"stylelint-order": "^5.0.0",
|
||||||
"typescript": "4.7.4",
|
"typescript": "4.7.4",
|
||||||
"unplugin-vue-define-options": "^0.6.2",
|
"unplugin-vue-define-options": "^0.6.2",
|
||||||
"vite": "3.0.0",
|
"vite": "3.0.1",
|
||||||
"vite-plugin-eslint": "^1.6.1",
|
"vite-plugin-eslint": "^1.6.1",
|
||||||
"vite-plugin-html": "^3.2.0",
|
"vite-plugin-html": "^3.2.0",
|
||||||
"vite-plugin-mock": "^2.9.6",
|
"vite-plugin-mock": "^2.9.6",
|
||||||
|
@ -102,12 +100,12 @@
|
||||||
"vite-plugin-style-import": "^1.4.1",
|
"vite-plugin-style-import": "^1.4.1",
|
||||||
"vite-plugin-svg-icons": "^2.0.1",
|
"vite-plugin-svg-icons": "^2.0.1",
|
||||||
"vite-plugin-windicss": "^1.8.7",
|
"vite-plugin-windicss": "^1.8.7",
|
||||||
"vue-tsc": "^0.38.5",
|
"vue-tsc": "^0.38.8",
|
||||||
"windicss": "^3.5.6",
|
"windicss": "^3.5.6",
|
||||||
"windicss-analysis": "^0.3.5"
|
"windicss-analysis": "^0.3.5"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">= 14.0.0"
|
"node": ">= 14.18.0"
|
||||||
},
|
},
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"repository": {
|
"repository": {
|
||||||
|
|
BIN
public/logo.png
Before Width: | Height: | Size: 38 KiB After Width: | Height: | Size: 9.0 KiB |
|
@ -8,4 +8,5 @@ export type UserType = {
|
||||||
password: string
|
password: string
|
||||||
role: string
|
role: string
|
||||||
roleId: string
|
roleId: string
|
||||||
|
permissions: string | string[]
|
||||||
}
|
}
|
||||||
|
|
Before Width: | Height: | Size: 86 KiB After Width: | Height: | Size: 6.1 KiB |
Before Width: | Height: | Size: 38 KiB After Width: | Height: | Size: 9.0 KiB |
Before Width: | Height: | Size: 181 KiB After Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 181 KiB After Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 187 KiB After Width: | Height: | Size: 19 KiB |
|
@ -1 +1 @@
|
||||||
<svg width="128" height="128" xmlns="http://www.w3.org/2000/svg"><path d="M115.147.062a13 13 0 0 1 4.94.945c1.55.63 2.907 1.526 4.069 2.688a13.148 13.148 0 0 1 2.761 4.069c.678 1.55 1.017 3.245 1.017 5.086v102.3c0 3.681-1.187 6.733-3.56 9.155-2.373 2.422-5.352 3.633-8.937 3.633H12.992c-3.875 0-7-1.26-9.373-3.779-2.373-2.518-3.56-5.667-3.56-9.445V12.704c0-3.39 1.163-6.345 3.488-8.863C5.872 1.32 8.972.062 12.847.062h102.3zM81.434 109.047c1.744 0 3.003-.412 3.778-1.235.775-.824 1.163-1.914 1.163-3.27 0-1.26-.388-2.325-1.163-3.197-.775-.872-2.034-1.307-3.778-1.307H72.57c.097-.194.145-.485.145-.872V27.09h9.01c1.743 0 2.954-.436 3.633-1.308.678-.872 1.017-1.938 1.017-3.197 0-1.26-.34-2.325-1.017-3.197-.679-.872-1.89-1.308-3.633-1.308H46.268c-1.743 0-2.954.436-3.632 1.308-.678.872-1.018 1.938-1.018 3.197 0 1.26.34 2.325 1.018 3.197.678.872 1.889 1.308 3.632 1.308h8.138v72.075c0 .193.024.339.073.436.048.096.072.242.072.436H46.56c-1.744 0-3.003.435-3.778 1.307-.775.872-1.163 1.938-1.163 3.197 0 1.356.388 2.446 1.163 3.27.775.823 2.034 1.235 3.778 1.235h34.875z"/></svg>
|
<svg width="128" height="128" xmlns="http://www.w3.org/2000/svg"><path d="M115.147.062a13 13 0 014.94.945c1.55.63 2.907 1.526 4.069 2.688a13.148 13.148 0 012.761 4.069c.678 1.55 1.017 3.245 1.017 5.086v102.3c0 3.681-1.187 6.733-3.56 9.155-2.373 2.422-5.352 3.633-8.937 3.633H12.992c-3.875 0-7-1.26-9.373-3.779-2.373-2.518-3.56-5.667-3.56-9.445V12.704c0-3.39 1.163-6.345 3.488-8.863C5.872 1.32 8.972.062 12.847.062h102.3zM81.434 109.047c1.744 0 3.003-.412 3.778-1.235.775-.824 1.163-1.914 1.163-3.27 0-1.26-.388-2.325-1.163-3.197-.775-.872-2.034-1.307-3.778-1.307H72.57c.097-.194.145-.485.145-.872V27.09h9.01c1.743 0 2.954-.436 3.633-1.308.678-.872 1.017-1.938 1.017-3.197 0-1.26-.34-2.325-1.017-3.197-.679-.872-1.89-1.308-3.633-1.308H46.268c-1.743 0-2.954.436-3.632 1.308-.678.872-1.018 1.938-1.018 3.197 0 1.26.34 2.325 1.018 3.197.678.872 1.889 1.308 3.632 1.308h8.138v72.075c0 .193.024.339.073.436.048.096.072.242.072.436H46.56c-1.744 0-3.003.435-3.778 1.307-.775.872-1.163 1.938-1.163 3.197 0 1.356.388 2.446 1.163 3.27.775.823 2.034 1.235 3.778 1.235h34.875z"/></svg>
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.0 KiB |
|
@ -1,47 +1 @@
|
||||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
<svg xmlns="http://www.w3.org/2000/svg" width="5760" height="3040"><image width="5760" height="3040" href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAFoAAAAvgAQMAAAC1QKagAAAABGdBTUEAALGPC/xhBQAAACBjSFJN AAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAABlBMVEUsNEr///91v/yPAAAA AWJLR0QB/wIt3gAAAAd0SU1FB+YBBQYyN1c3BnEAAAhjSURBVHja7cExAQAAAMKg9U9tDB+gAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAA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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAACAtwFzzwABY3VrRQAAACV0RVh0ZGF0ZTpjcmVhdGUAMjAyMi0wMS0wNVQwNjo1 MDo1MyswMDowMCfNlVoAAAAldEVYdGRhdGU6bW9kaWZ5ADIwMjItMDEtMDVUMDY6NTA6NTQrMDA6 MDCTNxNoAAAAAElFTkSuQmCC"/></svg>
|
||||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
|
||||||
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="5760px" height="3040px" viewBox="0 0 5760 3040" enable-background="new 0 0 5760 3040" xml:space="preserve"> <image id="image0" width="5760" height="3040" x="0" y="0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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
|
||||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
|
||||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
|
||||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
|
||||||
AAAAAAAAAAAAAACAtwFzzwABY3VrRQAAACV0RVh0ZGF0ZTpjcmVhdGUAMjAyMi0wMS0wNVQwNjo1
|
|
||||||
MDo1MyswMDowMCfNlVoAAAAldEVYdGRhdGU6bW9kaWZ5ADIwMjItMDEtMDVUMDY6NTA6NTQrMDA6
|
|
||||||
MDCTNxNoAAAAAElFTkSuQmCC" />
|
|
||||||
</svg>
|
|
Before Width: | Height: | Size: 3.7 KiB After Width: | Height: | Size: 3.3 KiB |
Before Width: | Height: | Size: 55 KiB After Width: | Height: | Size: 33 KiB |
|
@ -1 +1 @@
|
||||||
<svg width="128" height="128" xmlns="http://www.w3.org/2000/svg"><path d="M42.913 101.36c1.642 0 3.198.332 4.667.996a12.28 12.28 0 0 1 3.89 2.772c1.123 1.184 1.987 2.582 2.592 4.193.605 1.612.908 3.318.908 5.118 0 1.8-.303 3.507-.908 5.118-.605 1.611-1.469 3.01-2.593 4.194a13.3 13.3 0 0 1-3.889 2.843 10.582 10.582 0 0 1-4.667 1.066c-1.729 0-3.306-.355-4.732-1.066a13.604 13.604 0 0 1-3.825-2.843c-1.123-1.185-1.988-2.583-2.593-4.194a14.437 14.437 0 0 1-.907-5.118c0-1.8.302-3.506.907-5.118.605-1.61 1.47-3.009 2.593-4.193a12.515 12.515 0 0 1 3.825-2.772c1.426-.664 3.003-.996 4.732-.996zm53.932.285c1.643 0 3.22.331 4.733.995a11.386 11.386 0 0 1 3.889 2.772c1.08 1.185 1.945 2.583 2.593 4.194.648 1.61.972 3.317.972 5.118 0 1.8-.324 3.506-.972 5.117-.648 1.611-1.513 3.01-2.593 4.194a12.253 12.253 0 0 1-3.89 2.843 11 11 0 0 1-4.732 1.066 10.58 10.58 0 0 1-4.667-1.066 12.478 12.478 0 0 1-3.824-2.843c-1.08-1.185-1.945-2.583-2.593-4.194a13.581 13.581 0 0 1-.973-5.117c0-1.801.325-3.507.973-5.118.648-1.611 1.512-3.01 2.593-4.194a11.559 11.559 0 0 1 3.824-2.772 11.212 11.212 0 0 1 4.667-.995zm21.781-80.747c2.42 0 4.3.355 5.64 1.066 1.34.71 2.29 1.587 2.852 2.63a6.427 6.427 0 0 1 .778 3.34c-.044 1.185-.195 2.204-.454 3.057-.26.853-.8 2.606-1.62 5.26a589.268 589.268 0 0 1-2.788 8.743 1236.373 1236.373 0 0 0-3.047 9.453c-.994 3.128-1.75 5.592-2.269 7.393-1.123 3.79-2.55 6.42-4.278 7.89-1.728 1.469-3.846 2.203-6.352 2.203H39.023l1.945 12.795h65.342c4.148 0 6.223 1.943 6.223 5.828 0 1.896-.41 3.53-1.232 4.905-.821 1.374-2.442 2.061-4.862 2.061H38.505c-1.729 0-3.176-.426-4.343-1.28-1.167-.852-2.14-1.966-2.917-3.34a21.277 21.277 0 0 1-1.88-4.478 44.128 44.128 0 0 1-1.102-4.55c-.087-.568-.324-1.942-.713-4.122-.39-2.18-.865-4.904-1.426-8.174l-1.88-10.947c-.692-4.027-1.383-8.079-2.075-12.154-1.642-9.572-3.5-20.234-5.574-31.986H6.87c-1.296 0-2.377-.356-3.24-1.067a9.024 9.024 0 0 1-2.14-2.558 10.416 10.416 0 0 1-1.167-3.2C.108 8.53 0 7.488 0 6.54c0-1.896.583-3.46 1.75-4.69C2.917.615 4.494 0 6.482 0h13.095c1.728 0 3.111.284 4.148.853 1.037.569 1.858 1.28 2.463 2.132a8.548 8.548 0 0 1 1.297 2.701c.26.948.475 1.754.648 2.417.173.758.346 1.825.519 3.199.173 1.374.345 2.772.518 4.193.26 1.706.519 3.507.778 5.403h88.678z"/></svg>
|
<svg width="128" height="128" xmlns="http://www.w3.org/2000/svg"><path d="M42.913 101.36c1.642 0 3.198.332 4.667.996a12.28 12.28 0 013.89 2.772c1.123 1.184 1.987 2.582 2.592 4.193.605 1.612.908 3.318.908 5.118 0 1.8-.303 3.507-.908 5.118-.605 1.611-1.469 3.01-2.593 4.194a13.3 13.3 0 01-3.889 2.843 10.582 10.582 0 01-4.667 1.066c-1.729 0-3.306-.355-4.732-1.066a13.604 13.604 0 01-3.825-2.843c-1.123-1.185-1.988-2.583-2.593-4.194a14.437 14.437 0 01-.907-5.118c0-1.8.302-3.506.907-5.118.605-1.61 1.47-3.009 2.593-4.193a12.515 12.515 0 013.825-2.772c1.426-.664 3.003-.996 4.732-.996zm53.932.285c1.643 0 3.22.331 4.733.995a11.386 11.386 0 013.889 2.772c1.08 1.185 1.945 2.583 2.593 4.194.648 1.61.972 3.317.972 5.118 0 1.8-.324 3.506-.972 5.117-.648 1.611-1.513 3.01-2.593 4.194a12.253 12.253 0 01-3.89 2.843 11 11 0 01-4.732 1.066 10.58 10.58 0 01-4.667-1.066 12.478 12.478 0 01-3.824-2.843c-1.08-1.185-1.945-2.583-2.593-4.194a13.581 13.581 0 01-.973-5.117c0-1.801.325-3.507.973-5.118.648-1.611 1.512-3.01 2.593-4.194a11.559 11.559 0 013.824-2.772 11.212 11.212 0 014.667-.995zm21.781-80.747c2.42 0 4.3.355 5.64 1.066 1.34.71 2.29 1.587 2.852 2.63a6.427 6.427 0 01.778 3.34c-.044 1.185-.195 2.204-.454 3.057-.26.853-.8 2.606-1.62 5.26a589.268 589.268 0 01-2.788 8.743 1236.373 1236.373 0 00-3.047 9.453c-.994 3.128-1.75 5.592-2.269 7.393-1.123 3.79-2.55 6.42-4.278 7.89-1.728 1.469-3.846 2.203-6.352 2.203H39.023l1.945 12.795h65.342c4.148 0 6.223 1.943 6.223 5.828 0 1.896-.41 3.53-1.232 4.905-.821 1.374-2.442 2.061-4.862 2.061H38.505c-1.729 0-3.176-.426-4.343-1.28-1.167-.852-2.14-1.966-2.917-3.34a21.277 21.277 0 01-1.88-4.478 44.128 44.128 0 01-1.102-4.55c-.087-.568-.324-1.942-.713-4.122-.39-2.18-.865-4.904-1.426-8.174l-1.88-10.947c-.692-4.027-1.383-8.079-2.075-12.154-1.642-9.572-3.5-20.234-5.574-31.986H6.87c-1.296 0-2.377-.356-3.24-1.067a9.024 9.024 0 01-2.14-2.558 10.416 10.416 0 01-1.167-3.2C.108 8.53 0 7.488 0 6.54c0-1.896.583-3.46 1.75-4.69C2.917.615 4.494 0 6.482 0h13.095c1.728 0 3.111.284 4.148.853 1.037.569 1.858 1.28 2.463 2.132a8.548 8.548 0 011.297 2.701c.26.948.475 1.754.648 2.417.173.758.346 1.825.519 3.199.173 1.374.345 2.772.518 4.193.26 1.706.519 3.507.778 5.403h88.678z"/></svg>
|
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 2.2 KiB |
|
@ -0,0 +1,10 @@
|
||||||
|
import type { App } from 'vue'
|
||||||
|
import { setupPermissionDirective } from './permission/hasPermi'
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出指令:v-xxx
|
||||||
|
* @methods hasPermi 按钮权限,用法: v-hasPermi
|
||||||
|
*/
|
||||||
|
export const setupPermission = (app: App<Element>) => {
|
||||||
|
setupPermissionDirective(app)
|
||||||
|
}
|
|
@ -0,0 +1,47 @@
|
||||||
|
import type { App, Directive, DirectiveBinding } from 'vue'
|
||||||
|
import { useI18n } from '@/hooks/web/useI18n'
|
||||||
|
import { useCache } from '@/hooks/web/useCache'
|
||||||
|
import { intersection } from 'lodash-es'
|
||||||
|
import { isArray } from '@/utils/is'
|
||||||
|
import { useAppStoreWithOut } from '@/store/modules/app'
|
||||||
|
|
||||||
|
const { t } = useI18n()
|
||||||
|
const { wsCache } = useCache()
|
||||||
|
const appStore = useAppStoreWithOut()
|
||||||
|
|
||||||
|
// 全部权限
|
||||||
|
const all_permission = ['*.*.*']
|
||||||
|
const hasPermission = (value: string | string[]): boolean => {
|
||||||
|
const permissions = wsCache.get(appStore.getUserInfo).permissions as string[]
|
||||||
|
if (!value) {
|
||||||
|
throw new Error(t('permission.hasPermission'))
|
||||||
|
}
|
||||||
|
if (!isArray(value)) {
|
||||||
|
return permissions?.includes(value as string)
|
||||||
|
}
|
||||||
|
if (all_permission[0] === permissions[0]) {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
return (intersection(value, permissions) as string[]).length > 0
|
||||||
|
}
|
||||||
|
function hasPermi(el: Element, binding: DirectiveBinding) {
|
||||||
|
const value = binding.value
|
||||||
|
|
||||||
|
const flag = hasPermission(value)
|
||||||
|
if (!flag) {
|
||||||
|
el.parentNode?.removeChild(el)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const mounted = (el: Element, binding: DirectiveBinding<any>) => {
|
||||||
|
hasPermi(el, binding)
|
||||||
|
}
|
||||||
|
|
||||||
|
const permiDirective: Directive = {
|
||||||
|
mounted
|
||||||
|
}
|
||||||
|
|
||||||
|
export const setupPermissionDirective = (app: App<Element>) => {
|
||||||
|
app.directive('hasPermi', permiDirective)
|
||||||
|
}
|
||||||
|
|
||||||
|
export default permiDirective
|
|
@ -143,6 +143,9 @@ export default {
|
||||||
inputPassword: 'InputPassword',
|
inputPassword: 'InputPassword',
|
||||||
sticky: 'Sticky'
|
sticky: 'Sticky'
|
||||||
},
|
},
|
||||||
|
permission: {
|
||||||
|
hasPermission: 'Please set the operation permission value'
|
||||||
|
},
|
||||||
analysis: {
|
analysis: {
|
||||||
newUser: 'New user',
|
newUser: 'New user',
|
||||||
unreadInformation: 'Unread information',
|
unreadInformation: 'Unread information',
|
||||||
|
|
|
@ -143,6 +143,9 @@ export default {
|
||||||
inputPassword: '密码输入框',
|
inputPassword: '密码输入框',
|
||||||
sticky: '黏性'
|
sticky: '黏性'
|
||||||
},
|
},
|
||||||
|
permission: {
|
||||||
|
hasPermission: '请设置操作权限值'
|
||||||
|
},
|
||||||
analysis: {
|
analysis: {
|
||||||
newUser: '新增用户',
|
newUser: '新增用户',
|
||||||
unreadInformation: '未读消息',
|
unreadInformation: '未读消息',
|
||||||
|
|
|
@ -25,6 +25,9 @@ import '@/plugins/animate.css'
|
||||||
// 路由
|
// 路由
|
||||||
import { setupRouter } from './router'
|
import { setupRouter } from './router'
|
||||||
|
|
||||||
|
// 权限
|
||||||
|
import { setupPermission } from './directives'
|
||||||
|
|
||||||
import { createApp } from 'vue'
|
import { createApp } from 'vue'
|
||||||
|
|
||||||
import App from './App.vue'
|
import App from './App.vue'
|
||||||
|
@ -44,6 +47,8 @@ const setupAll = async () => {
|
||||||
|
|
||||||
setupRouter(app)
|
setupRouter(app)
|
||||||
|
|
||||||
|
setupPermission(app)
|
||||||
|
|
||||||
app.mount('#app')
|
app.mount('#app')
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -231,13 +231,17 @@ const save = async () => {
|
||||||
@register="register"
|
@register="register"
|
||||||
>
|
>
|
||||||
<template #action="{ row }">
|
<template #action="{ row }">
|
||||||
<ElButton type="primary" @click="action(row, 'edit')">
|
<ElButton type="primary" v-hasPermi="['example:dialog:edit']" @click="action(row, 'edit')">
|
||||||
{{ t('exampleDemo.edit') }}
|
{{ t('exampleDemo.edit') }}
|
||||||
</ElButton>
|
</ElButton>
|
||||||
<ElButton type="success" @click="action(row, 'detail')">
|
<ElButton
|
||||||
|
type="success"
|
||||||
|
v-hasPermi="['example:dialog:view']"
|
||||||
|
@click="action(row, 'detail')"
|
||||||
|
>
|
||||||
{{ t('exampleDemo.detail') }}
|
{{ t('exampleDemo.detail') }}
|
||||||
</ElButton>
|
</ElButton>
|
||||||
<ElButton type="danger" @click="delData(row, false)">
|
<ElButton type="danger" v-hasPermi="['example:dialog:delete']" @click="delData(row, false)">
|
||||||
{{ t('exampleDemo.del') }}
|
{{ t('exampleDemo.del') }}
|
||||||
</ElButton>
|
</ElButton>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -20,7 +20,6 @@ function pathResolve(dir: string) {
|
||||||
return resolve(root, '.', dir)
|
return resolve(root, '.', dir)
|
||||||
}
|
}
|
||||||
|
|
||||||
// https://vitejs.dev/config/
|
|
||||||
export default ({ command, mode }: ConfigEnv): UserConfig => {
|
export default ({ command, mode }: ConfigEnv): UserConfig => {
|
||||||
let env = {} as any
|
let env = {} as any
|
||||||
const isBuild = command === 'build'
|
const isBuild = command === 'build'
|
||||||
|
@ -146,8 +145,7 @@ export default ({ command, mode }: ConfigEnv): UserConfig => {
|
||||||
'intro.js',
|
'intro.js',
|
||||||
'qrcode',
|
'qrcode',
|
||||||
'@wangeditor/editor',
|
'@wangeditor/editor',
|
||||||
'@wangeditor/editor-for-vue',
|
'@wangeditor/editor-for-vue'
|
||||||
'js-md5'
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|