diff --git a/README.md b/README.md index 5aff65e..55d3ffa 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,11 @@

+[![Website]()](https://vue-admin-beautiful.com) +[![stars](https://img.shields.io/github/stars/chuzhixin/vue-admin-beautiful?style=flat-square&logo=GitHub)](https://github.com/chuzhixin/vue-admin-beautiful) +[![star](https://gitee.com/chu1204505056/vue-admin-beautiful/badge/star.svg?theme=gray)](https://gitee.com/chu1204505056/vue-admin-beautiful) +[![license](https://img.shields.io/github/license/chuzhixin/vue-admin-beautiful?style=flat-square)](https://en.wikipedia.org/wiki/MIT_License) + ## 地址 - [🎉 vue2.x + element-ui(免费商用,支持 PC、平板、手机)](http://vue-admin-beautiful.com/vue-admin-beautiful-element/?hmsr=github&hmpl=&hmcu=&hmkw=&hmci=) diff --git a/package.json b/package.json index a08b870..36de720 100644 --- a/package.json +++ b/package.json @@ -41,7 +41,7 @@ "dependencies": { "axios": "^0.21.1", "clipboard": "^2.0.8", - "core-js": "^3.13.1", + "core-js": "^3.14.0", "dayjs": "^1.10.5", "echarts": "^5.1.1", "echarts-wordcloud": "^2.0.0", @@ -78,14 +78,14 @@ "body-parser": "^1.19.0", "chalk": "^4.1.1", "chokidar": "^3.5.1", - "eslint": "^7.27.0", + "eslint": "^7.28.0", "eslint-plugin-prettier": "^3.4.0", "eslint-plugin-vue": "^7.10.0", "filemanager-webpack-plugin": "^5.0.0", "image-webpack-loader": "^7.0.1", "lint-staged": "^11.0.0", "plop": "^2.7.4", - "prettier": "^2.3.0", + "prettier": "^2.3.1", "sass": "~1.32.13", "sass-loader": "^10.1.1", "stylelint": "^13.13.1", diff --git a/src/api/github.js b/src/api/github.js index 2d218dc..9256423 100644 --- a/src/api/github.js +++ b/src/api/github.js @@ -11,8 +11,7 @@ export function getRepos(params) { export function getStargazers(params) { return request({ - url: - 'https://api.github.com/repos/chuzhixin/vue-admin-beautiful/stargazers', + url: 'https://api.github.com/repos/chuzhixin/vue-admin-beautiful/stargazers', method: 'get', params, timeout: 10000, diff --git a/src/router/index.js b/src/router/index.js index dc275c4..9853378 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -256,8 +256,7 @@ export const asyncRoutes = [ meta: { title: '错误日志模拟', permissions: ['admin'] }, }, { - path: - 'https://github.com/chuzhixin/vue-admin-beautiful?utm_source=gold_browser_extension', + path: 'https://github.com/chuzhixin/vue-admin-beautiful?utm_source=gold_browser_extension', name: 'ExternalLink', meta: { title: '外链', diff --git a/src/utils/validate.js b/src/utils/validate.js index 46a40f8..01100ed 100644 --- a/src/utils/validate.js +++ b/src/utils/validate.js @@ -47,7 +47,8 @@ export function isName(value) { * @returns {boolean} */ export function isIP(ip) { - const reg = /^(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])$/ + const reg = + /^(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])$/ return reg.test(ip) } @@ -58,7 +59,8 @@ export function isIP(ip) { * @returns {boolean} */ export function isUrl(url) { - const reg = /^(https?|ftp):\/\/([a-zA-Z0-9.-]+(:[a-zA-Z0-9.&%$-]+)*@)*((25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]?)(\.(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])){3}|([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+\.(com|edu|gov|int|mil|net|org|biz|arpa|info|name|pro|aero|coop|museum|[a-zA-Z]{2}))(:[0-9]+)*(\/($|[a-zA-Z0-9.,?'\\+&%$#=~_-]+))*$/ + const reg = + /^(https?|ftp):\/\/([a-zA-Z0-9.-]+(:[a-zA-Z0-9.&%$-]+)*@)*((25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]?)(\.(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])){3}|([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+\.(com|edu|gov|int|mil|net|org|biz|arpa|info|name|pro|aero|coop|museum|[a-zA-Z]{2}))(:[0-9]+)*(\/($|[a-zA-Z0-9.,?'\\+&%$#=~_-]+))*$/ return reg.test(url) } @@ -125,7 +127,8 @@ export function isArray(arg) { * @returns {boolean} */ export function isPort(str) { - const reg = /^([0-9]|[1-9]\d|[1-9]\d{2}|[1-9]\d{3}|[1-5]\d{4}|6[0-4]\d{3}|65[0-4]\d{2}|655[0-2]\d|6553[0-5])$/ + const reg = + /^([0-9]|[1-9]\d|[1-9]\d{2}|[1-9]\d{3}|[1-5]\d{4}|6[0-4]\d{3}|65[0-4]\d{2}|655[0-2]\d|6553[0-5])$/ return reg.test(str) } @@ -147,7 +150,8 @@ export function isPhone(str) { * @returns {boolean} */ export function isIdCard(str) { - const reg = /^[1-9]\d{5}(18|19|([23]\d))\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/ + const reg = + /^[1-9]\d{5}(18|19|([23]\d))\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/ return reg.test(str) } @@ -196,7 +200,8 @@ export function isBlank(str) { * @returns {boolean} */ export function isTel(str) { - const reg = /^(400|800)([0-9\\-]{7,10})|(([0-9]{4}|[0-9]{3})(-| )?)?([0-9]{7,8})((-| |转)*([0-9]{1,4}))?$/ + const reg = + /^(400|800)([0-9\\-]{7,10})|(([0-9]{4}|[0-9]{3})(-| )?)?([0-9]{7,8})((-| |转)*([0-9]{1,4}))?$/ return reg.test(str) } diff --git a/src/views/vab/tree/index.vue b/src/views/vab/tree/index.vue index 565e5ae..d7c086f 100644 --- a/src/views/vab/tree/index.vue +++ b/src/views/vab/tree/index.vue @@ -401,9 +401,8 @@ const { data } = await getTreeList() this.selectTreeData = data this.$nextTick(() => { - this.selectTreeDefaultSelectedKeys = this.singleSelectTreeKey.split( - ',' - ) // 设置默认展开 + this.selectTreeDefaultSelectedKeys = + this.singleSelectTreeKey.split(',') // 设置默认展开 if (treeType == 'single') { //单选树 this.$refs.singleSelectTree.setCurrentKey(this.singleSelectTreeKey) // 设置默认选中