From 8c64de839353fde51896517726a26b6a2fc011ac Mon Sep 17 00:00:00 2001 From: lyt <1105290566@qq.com> Date: Mon, 15 Mar 2021 12:44:58 +0800 Subject: [PATCH] =?UTF-8?q?'admin-21.03.14:=E6=AD=A4=E6=AC=A1=E7=89=88?= =?UTF-8?q?=E6=9C=AC=E5=8F=98=E5=8A=A8=E5=A4=A7=EF=BC=81=E6=96=B0=E5=A2=9E?= =?UTF-8?q?eslint=E3=80=81prettier=E3=80=81vuex=E6=A8=A1=E5=9D=97=E5=8C=96?= =?UTF-8?q?=E3=80=81echartsMap=E7=AD=89=E7=B3=BB=E5=88=97=E4=BC=98?= =?UTF-8?q?=E5=8C=96'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .eslintignore | 18 + .eslintrc.js | 52 + .gitignore | 3 +- .prettierrc.js | 39 + build/utils.ts | 24 - index.html | 88 +- package.json | 85 +- shim.d.ts | 9 +- source.d.ts | 6 +- src/App.vue | 120 +- src/api/login/index.ts | 24 +- src/api/menu/index.ts | 22 +- src/components/auth/auth.vue | 46 +- src/components/auth/authAll.vue | 48 +- src/components/auth/auths.vue | 58 +- src/components/cropper/index.vue | 271 ++- src/components/iconSelector/index.vue | 324 ++-- src/main.ts | 28 +- src/router/index.ts | 1651 +++++++++-------- src/store/index.ts | 143 +- src/store/interface/index.ts | 84 + src/store/modules/keepAliveNames.ts | 22 + src/store/modules/requestOldRoutes.ts | 22 + src/store/modules/routesList.ts | 22 + src/store/modules/tagsViewRoutes.ts | 22 + src/store/modules/themeConfig.ts | 132 ++ src/store/modules/userInfos.ts | 27 + src/theme/app.scss | 3 +- src/theme/common/transition.scss | 76 +- src/theme/common/var.scss | 116 +- src/theme/element.scss | 682 ++++--- src/theme/iconSelector.scss | 166 +- src/theme/media/chart.scss | 148 +- src/theme/media/cityLinkage.scss | 8 +- src/theme/media/dialog.scss | 6 +- src/theme/media/error.scss | 48 +- src/theme/media/form.scss | 14 +- src/theme/media/home.scss | 8 +- src/theme/media/layout.scss | 78 +- src/theme/media/login.scss | 30 +- src/theme/media/pagination.scss | 10 +- src/theme/media/personal.scss | 20 +- src/theme/media/scrollbar.scss | 90 +- src/theme/media/tagsView.scss | 10 +- src/theme/mixins/element-mixins.scss | 26 +- src/theme/mixins/function.scss | 2 +- src/theme/mixins/mixins.scss | 54 +- src/theme/other.scss | 20 +- src/utils/arrayOperation.ts | 18 +- src/utils/authDirective.ts | 58 +- src/utils/authFunction.ts | 23 +- src/utils/formatTime.ts | 157 +- src/utils/getStyleSheets.ts | 179 +- src/utils/request.ts | 48 +- src/utils/setIconfont.ts | 55 +- src/utils/storage.ts | 20 +- src/utils/theme.ts | 48 +- src/utils/themeConfig.ts | 112 -- src/utils/toolsValidate.js | 219 --- src/utils/toolsValidate.ts | 246 +++ src/utils/viteBuild.ts | 26 + src/utils/wartermark.ts | 72 +- src/views/chart/chart.scss | 854 +++++---- src/views/chart/chart.ts | 128 +- src/views/chart/head.vue | 203 +- src/views/chart/index.vue | 924 +++++---- src/views/docs/index.vue | 3 - src/views/error/401.vue | 168 +- src/views/error/404.vue | 164 +- src/views/fun/countup/index.vue | 283 +-- src/views/fun/cropper/index.vue | 89 +- src/views/fun/echartsMap/index.vue | 130 ++ src/views/fun/echartsMap/mock.ts | 387 ++++ src/views/fun/mindMap/index.vue | 1014 +++++----- src/views/fun/qrcode/index.vue | 118 +- src/views/fun/selector/index.vue | 48 +- src/views/fun/tagsView/index.vue | 289 ++- src/views/fun/tree/index.vue | 159 +- src/views/fun/tree/mock.ts | 754 ++++---- src/views/fun/wangEditor/index.vue | 70 +- src/views/home/index.vue | 802 ++++---- src/views/home/mock.ts | 144 +- src/views/layout/component/aside.vue | 270 ++- src/views/layout/component/columnsAside.vue | 390 ++-- src/views/layout/component/header.vue | 42 +- src/views/layout/component/main.vue | 164 +- src/views/layout/footer/index.vue | 66 +- src/views/layout/index.vue | 116 +- src/views/layout/lockScreen/index.vue | 536 +++--- src/views/layout/logo/index.vue | 140 +- src/views/layout/main/classic.vue | 32 +- src/views/layout/main/columns.vue | 58 +- src/views/layout/main/defaults.vue | 72 +- src/views/layout/main/transverse.vue | 18 +- .../layout/navBars/breadcrumb/breadcrumb.vue | 221 +-- src/views/layout/navBars/breadcrumb/index.vue | 233 ++- .../layout/navBars/breadcrumb/search.vue | 197 +- .../layout/navBars/breadcrumb/setings.vue | 1615 ++++++++-------- src/views/layout/navBars/breadcrumb/user.vue | 370 ++-- .../layout/navBars/breadcrumb/userNews.vue | 206 +- src/views/layout/navBars/index.vue | 52 +- .../layout/navBars/tagsView/contextmenu.vue | 188 +- .../layout/navBars/tagsView/tagsView.vue | 975 +++++----- src/views/layout/navMenu/horizontal.vue | 285 ++- src/views/layout/navMenu/subItem.vue | 78 +- src/views/layout/navMenu/vertical.vue | 147 +- src/views/layout/routerView/iframes.vue | 119 +- src/views/layout/routerView/link.vue | 47 +- src/views/layout/routerView/parent.vue | 126 +- src/views/limits/backEnd/page/index.vue | 43 +- src/views/limits/frontEnd/btn/index.vue | 490 +++-- src/views/limits/frontEnd/page/index.vue | 194 +- src/views/login/component/account.vue | 339 ++-- src/views/login/component/mobile.vue | 94 +- src/views/login/index.vue | 237 +-- src/views/menu/menu1/menu11/index.vue | 28 +- src/views/menu/menu1/menu12/menu121/index.vue | 28 +- src/views/menu/menu1/menu12/menu122/index.vue | 28 +- src/views/menu/menu1/menu13/index.vue | 40 +- src/views/menu/menu2/index.vue | 28 +- src/views/pages/awesome/index.vue | 150 +- src/views/pages/cityLinkage/index.vue | 175 +- src/views/pages/element/index.vue | 152 +- src/views/pages/filtering/index.vue | 641 +++---- src/views/pages/filtering/mock.ts | 413 ++--- src/views/pages/formAdapt/index.vue | 182 +- src/views/pages/iocnfont/index.vue | 142 +- src/views/pages/listAdapt/index.vue | 324 ++-- src/views/pages/listAdapt/mock.ts | 211 +-- src/views/personal/index.vue | 723 ++++---- src/views/personal/mock.ts | 102 +- src/views/system/menu/component/addMenu.vue | 370 ++-- src/views/system/menu/component/editMenu.vue | 393 ++-- src/views/system/menu/index.vue | 209 +-- src/views/system/user/index.vue | 192 +- src/views/tools/index.vue | 921 +++++---- tsconfig.json | 124 +- vite.config.ts | 74 +- yarn.lock | 702 ------- 139 files changed, 13669 insertions(+), 13860 deletions(-) create mode 100644 .eslintignore create mode 100644 .eslintrc.js create mode 100644 .prettierrc.js delete mode 100644 build/utils.ts create mode 100644 src/store/interface/index.ts create mode 100644 src/store/modules/keepAliveNames.ts create mode 100644 src/store/modules/requestOldRoutes.ts create mode 100644 src/store/modules/routesList.ts create mode 100644 src/store/modules/tagsViewRoutes.ts create mode 100644 src/store/modules/themeConfig.ts create mode 100644 src/store/modules/userInfos.ts delete mode 100644 src/utils/themeConfig.ts delete mode 100644 src/utils/toolsValidate.js create mode 100644 src/utils/toolsValidate.ts create mode 100644 src/utils/viteBuild.ts delete mode 100644 src/views/docs/index.vue create mode 100644 src/views/fun/echartsMap/index.vue create mode 100644 src/views/fun/echartsMap/mock.ts delete mode 100644 yarn.lock diff --git a/.eslintignore b/.eslintignore new file mode 100644 index 00000000..cfc877d6 --- /dev/null +++ b/.eslintignore @@ -0,0 +1,18 @@ + +*.sh +node_modules +lib +*.md +*.scss +*.woff +*.ttf +.vscode +.idea +dist +mock +public +bin +build +config +index.html +src/assets \ No newline at end of file diff --git a/.eslintrc.js b/.eslintrc.js new file mode 100644 index 00000000..25a21bda --- /dev/null +++ b/.eslintrc.js @@ -0,0 +1,52 @@ +module.exports = { + env: { + browser: true, + es2021: true, + node: true, + }, + parser: 'vue-eslint-parser', + parserOptions: { + ecmaVersion: 12, + parser: '@typescript-eslint/parser', + sourceType: 'module', + }, + extends: ['plugin:vue/essential'], + plugins: ['vue', '@typescript-eslint'], + rules: { + // http://eslint.cn/docs/rules/ + // https://eslint.vuejs.org/rules/ + '@type-eslint/ban-ts-ignore': 'off', + '@type-eslint/explicit-function-return-type': 'off', + '@type-eslint/no-explicit-any': 'off', + '@type-eslint/no-var-requires': 'off', + '@type-eslint/no-empty-function': 'off', + '@type-eslint/no-use-before-define': 'off', + '@type-eslint/ban-ts-comment': 'off', + '@type-eslint/ban-types': 'off', + '@type-eslint/no-non-null-assertion': 'off', + '@type-eslint/explicit-module-boundary-types': 'off', + 'vue/custom-event-name-casing': 'off', + 'vue/attributes-order': 'off', + 'vue/one-component-per-file': 'off', + 'vue/html-closing-bracket-newline': 'off', + 'vue/max-attributes-per-line': 'off', + 'vue/multiline-html-element-content-newline': 'off', + 'vue/singleline-html-element-content-newline': 'off', + 'vue/attribute-hyphenation': 'off', + 'vue/html-self-closing': 'off', + 'vue/no-multiple-template-root': 'off', + 'vue/require-default-prop': 'off', + 'vue/no-v-model-argument': 'off', + 'vue/no-arrow-functions-in-watch': 'off', + 'vue/no-template-key': 'off', + 'vue/no-v-html': 'off', + 'no-use-before-define': 'off', + 'no-restricted-globals': 'off', + 'no-restricted-syntax': 'off', + 'generator-star-spacing': 'off', + 'no-unreachable': 'off', + 'no-multiple-template-root': 'off', + 'no-unused-vars': 'error', + 'no-v-model-argument': 'off', + }, +}; diff --git a/.gitignore b/.gitignore index 53f7466a..a3ef6f33 100644 --- a/.gitignore +++ b/.gitignore @@ -2,4 +2,5 @@ node_modules .DS_Store dist dist-ssr -*.local \ No newline at end of file +*.local +.vscode \ No newline at end of file diff --git a/.prettierrc.js b/.prettierrc.js new file mode 100644 index 00000000..d0638a7e --- /dev/null +++ b/.prettierrc.js @@ -0,0 +1,39 @@ +module.exports = { + // 一行最多多少个字符 + printWidth: 150, + // 指定每个缩进级别的空格数 + tabWidth: 2, + // 使用制表符而不是空格缩进行 + useTabs: true, + // 在语句末尾打印分号 + semi: true, + // 使用单引号而不是双引号 + singleQuote: true, + // 更改引用对象属性的时间 可选值"" + quoteProps: 'as-needed', + // 在JSX中使用单引号而不是双引号 + jsxSingleQuote: false, + // 多行时尽可能打印尾随逗号。(例如,单行数组永远不会出现逗号结尾。) 可选值"",默认none + trailingComma: 'es5', + // 在对象文字中的括号之间打印空格 + bracketSpacing: true, + // jsx 标签的反尖括号需要换行 + jsxBracketSameLine: false, + // 在单独的箭头函数参数周围包括括号 always:(x) => x \ avoid:x => x + arrowParens: 'always', + // 这两个选项可用于格式化以给定字符偏移量(分别包括和不包括)开始和结束的代码 + rangeStart: 0, + rangeEnd: Infinity, + // 指定要使用的解析器,不需要写文件开头的 @prettier + requirePragma: false, + // 不需要自动在文件开头插入 @prettier + insertPragma: false, + // 使用默认的折行标准 always\never\preserve + proseWrap: 'preserve', + // 指定HTML文件的全局空格敏感度 css\strict\ignore + htmlWhitespaceSensitivity: 'css', + // Vue文件脚本和样式标签缩进 + vueIndentScriptAndStyle: false, + // 换行符使用 lf 结尾是 可选值"" + endOfLine: 'lf', +} diff --git a/build/utils.ts b/build/utils.ts deleted file mode 100644 index 588b2bbb..00000000 --- a/build/utils.ts +++ /dev/null @@ -1,24 +0,0 @@ -// vite 打包相关 -import dotenv from 'dotenv' -export interface ViteEnv { - VITE_PORT: number, - VITE_OPEN: boolean, - VITE_PUBLIC_PATH: string -} - -export function loadEnv(): ViteEnv { - const env = process.env.NODE_ENV - const ret: any = {} - const envList = [`.env.${env}.local`, `.env.${env}`, '.env.local', '.env', ,] - envList.forEach((e) => { dotenv.config({ path: e }) }) - for (const envName of Object.keys(process.env)) { - console.log(envName) - let realName = (process.env as any)[envName].replace(/\\n/g, '\n') - realName = realName === 'true' ? true : realName === 'false' ? false : realName - if (envName === 'VITE_PORT') realName = Number(realName) - if (envName === 'VITE_OPEN') realName = Boolean(realName) - ret[envName] = realName - process.env[envName] = realName - } - return ret -} \ No newline at end of file diff --git a/index.html b/index.html index 11c72338..347aa7d8 100644 --- a/index.html +++ b/index.html @@ -1,48 +1,46 @@ - - - - - - - - - vue-next-admin - - -
-
-
-
-
-
-
-
-
-
-
-
- - - + + + + + + + + + vue-next-admin + + +
+
+
+
+
+
+
+
+
+
+
+
+ + + + diff --git a/package.json b/package.json index 8d60aa49..fa978db0 100644 --- a/package.json +++ b/package.json @@ -1,39 +1,48 @@ { - "name": "vue-next-admin", - "version": "1.0.0", - "scripts": { - "dev": "vite", - "build": "vite build" - }, - "dependencies": { - "axios": "^0.21.1", - "clipboard": "^2.0.7", - "countup.js": "^2.0.7", - "cropperjs": "^1.5.11", - "echarts": "^5.0.2", - "echarts-wordcloud": "^2.0.0", - "element-plus": "^1.0.2-beta.33", - "mitt": "^2.1.0", - "nprogress": "^0.2.0", - "screenfull": "^5.1.0", - "sortablejs": "^1.13.0", - "vue": "^3.0.5", - "vue-router": "^4.0.2", - "vuex": "^4.0.0-rc.2", - "wangeditor": "^4.6.8" - }, - "devDependencies": { - "@types/axios": "^0.14.0", - "@types/clipboard": "^2.0.1", - "@types/node": "^14.14.32", - "@types/nprogress": "^0.2.0", - "@types/sortablejs": "^1.10.6", - "@vitejs/plugin-vue": "^1.1.5", - "@vue/compiler-sfc": "^3.0.7", - "dotenv": "^8.2.0", - "sass": "^1.32.8", - "sass-loader": "^11.0.1", - "typescript": "^4.2.3", - "vite": "^2.0.5" - } -} \ No newline at end of file + "name": "vue-next-admin", + "version": "1.0.0", + "scripts": { + "dev": "vite", + "build": "vite build", + "lint-fix": "eslint --fix --ext .js --ext .jsx --ext .vue src/" + }, + "dependencies": { + "@antv/g6": "^4.2.0", + "axios": "^0.21.1", + "clipboard": "^2.0.8", + "countup.js": "^2.0.7", + "cropperjs": "^1.5.11", + "echarts": "^5.0.2", + "echarts-wordcloud": "^2.0.0", + "element-plus": "^1.0.2-beta.34", + "mitt": "^2.1.0", + "nprogress": "^0.2.0", + "qrcodejs2-fixes": "^0.0.2", + "screenfull": "^5.1.0", + "sortablejs": "^1.13.0", + "vue": "^3.0.5", + "vue-router": "^4.0.2", + "vuex": "^4.0.0-rc.2", + "wangeditor": "^4.6.9" + }, + "devDependencies": { + "@types/axios": "^0.14.0", + "@types/clipboard": "^2.0.1", + "@types/node": "^14.14.34", + "@types/nprogress": "^0.2.0", + "@types/sortablejs": "^1.10.6", + "@typescript-eslint/eslint-plugin": "^4.17.0", + "@typescript-eslint/parser": "^4.17.0", + "@vitejs/plugin-vue": "^1.1.5", + "@vue/compiler-sfc": "^3.0.7", + "dotenv": "^8.2.0", + "eslint": "^7.22.0", + "eslint-plugin-vue": "^7.7.0", + "prettier": "^2.2.1", + "sass": "^1.32.8", + "sass-loader": "^11.0.1", + "typescript": "^4.2.3", + "vite": "^2.0.5", + "vue-eslint-parser": "^7.6.0" + } +} diff --git a/shim.d.ts b/shim.d.ts index d1f4e4d7..4b21c769 100644 --- a/shim.d.ts +++ b/shim.d.ts @@ -1,5 +1,4 @@ -declare module "*.vue" { - import { Component } from "vue" - const component: Component - export default component -} \ No newline at end of file +declare module '*.vue' { + const component: DefineComponent<{}, {}, any>; + export default component; +} diff --git a/source.d.ts b/source.d.ts index d6186130..94a1ad93 100644 --- a/source.d.ts +++ b/source.d.ts @@ -1,6 +1,8 @@ -declare const React: string; declare module '*.json'; declare module '*.png'; declare module '*.jpg'; declare module '*.scss'; -declare module '*.ts'; \ No newline at end of file +declare module '*.ts'; +declare module 'qrcodejs2-fixes'; +declare module 'element-plus'; +declare module 'element-plus/lib/locale/lang/zh-cn'; diff --git a/src/App.vue b/src/App.vue index 3338fdb3..64cc7e27 100644 --- a/src/App.vue +++ b/src/App.vue @@ -1,68 +1,60 @@ \ No newline at end of file +import { computed, ref, getCurrentInstance, onBeforeMount, onMounted, onUnmounted, nextTick, defineComponent } from 'vue'; +import { useStore } from '/@/store/index.ts'; +import { getLocal } from '/@/utils/storage.ts'; +import setIntroduction from '/@/utils/setIconfont.ts'; +import LockScreen from '/@/views/layout/lockScreen/index.vue'; +import Setings from '/@/views/layout/navBars/breadcrumb/setings.vue'; +export default defineComponent({ + name: 'app', + components: { LockScreen, Setings }, + setup() { + const { proxy } = getCurrentInstance() as any; + const setingsRef = ref(); + const store = useStore(); + // 获取布局配置信息 + const getThemeConfig = computed(() => { + return store.state.themeConfig.themeConfig; + }); + // 布局配置弹窗打开 + const openSetingsDrawer = () => { + setingsRef.value.openDrawer(); + }; + // 设置初始化,防止刷新时恢复默认 + onBeforeMount(() => { + // 设置批量第三方 icon 图标 + setIntroduction.cssCdn(); + // 设置批量第三方 js + setIntroduction.jsCdn(); + }); + // 页面加载时 + onMounted(() => { + nextTick(() => { + // 监听布局配置弹窗点击打开 + proxy.mittBus.on('openSetingsDrawer', () => { + openSetingsDrawer(); + }); + // 获取缓存中的布局配置 + if (getLocal('themeConfig')) { + store.dispatch('themeConfig/setThemeConfig', getLocal('themeConfig')); + document.documentElement.style.cssText = getLocal('themeConfigStyle'); + } + }); + }); + // 页面销毁时,关闭监听布局配置 + onUnmounted(() => { + proxy.mittBus.off('openSetingsDrawer', () => {}); + }); + return { + setingsRef, + getThemeConfig, + }; + }, +}); + diff --git a/src/api/login/index.ts b/src/api/login/index.ts index 175fca52..8512a243 100644 --- a/src/api/login/index.ts +++ b/src/api/login/index.ts @@ -1,19 +1,19 @@ -import request from '/@/utils/request.ts' +import request from '/@/utils/request.ts'; // 用户登录 export function signIn(params: object) { - return request({ - url: '/user/signIn', - method: 'post', - data: params - }) + return request({ + url: '/user/signIn', + method: 'post', + data: params, + }); } // 用户退出登录 export function signOut(params: object) { - return request({ - url: '/user/signOut', - method: 'post', - data: params - }) -} \ No newline at end of file + return request({ + url: '/user/signOut', + method: 'post', + data: params, + }); +} diff --git a/src/api/menu/index.ts b/src/api/menu/index.ts index 4d22ed7e..178ff8f9 100644 --- a/src/api/menu/index.ts +++ b/src/api/menu/index.ts @@ -1,4 +1,4 @@ -import request from '/@/utils/request.ts' +import request from '/@/utils/request.ts'; /** * 后端控制菜单模拟json,路径在 https://gitee.com/lyt-top/vue-next-admin-images/raw/master/menu/menu @@ -6,18 +6,18 @@ import request from '/@/utils/request.ts' */ // 获取后端动态路由菜单(admin) export function getMenuAdmin(params?: object) { - return request({ - url: '/gitee/lyt-top/vue-next-admin-images/raw/master/menu/adminMenu.json', - method: 'get', - params, - }); + return request({ + url: '/gitee/lyt-top/vue-next-admin-images/raw/master/menu/adminMenu.json', + method: 'get', + params, + }); } // 获取后端动态路由菜单(test) export function getMenuTest(params?: object) { - return request({ - url: '/gitee/lyt-top/vue-next-admin-images/raw/master/menu/testMenu.json', - method: 'get', - params, - }); + return request({ + url: '/gitee/lyt-top/vue-next-admin-images/raw/master/menu/testMenu.json', + method: 'get', + params, + }); } diff --git a/src/components/auth/auth.vue b/src/components/auth/auth.vue index 832ef637..6bde67ed 100644 --- a/src/components/auth/auth.vue +++ b/src/components/auth/auth.vue @@ -1,29 +1,29 @@ \ No newline at end of file + diff --git a/src/components/auth/authAll.vue b/src/components/auth/authAll.vue index b47901c1..de49c475 100644 --- a/src/components/auth/authAll.vue +++ b/src/components/auth/authAll.vue @@ -1,30 +1,30 @@ \ No newline at end of file + diff --git a/src/components/auth/auths.vue b/src/components/auth/auths.vue index b9293ab3..2df746d1 100644 --- a/src/components/auth/auths.vue +++ b/src/components/auth/auths.vue @@ -1,35 +1,35 @@ \ No newline at end of file + diff --git a/src/components/cropper/index.vue b/src/components/cropper/index.vue index af433b67..082db12f 100644 --- a/src/components/cropper/index.vue +++ b/src/components/cropper/index.vue @@ -1,148 +1,145 @@ \ No newline at end of file + diff --git a/src/components/iconSelector/index.vue b/src/components/iconSelector/index.vue index 1ce89a57..49746393 100644 --- a/src/components/iconSelector/index.vue +++ b/src/components/iconSelector/index.vue @@ -1,165 +1,171 @@ \ No newline at end of file + diff --git a/src/main.ts b/src/main.ts index 3701c812..c3f55e52 100644 --- a/src/main.ts +++ b/src/main.ts @@ -1,17 +1,17 @@ -import { createApp } from 'vue' -import App from './App.vue' -import router from './router' -import { store, key } from './store' -import { authDirective } from '/@/utils/authDirective.ts' +import { createApp } from 'vue'; +import App from './App.vue'; +import router from './router'; +import { store, key } from './store'; +import { authDirective } from '/@/utils/authDirective.ts'; -import ElementPlus from 'element-plus' -import 'element-plus/lib/theme-chalk/index.css' -import '/@/theme/index.scss' -import lang from 'element-plus/lib/locale/lang/zh-cn' -import mitt from "mitt" +import ElementPlus from 'element-plus'; +import 'element-plus/lib/theme-chalk/index.css'; +import '/@/theme/index.scss'; +import lang from 'element-plus/lib/locale/lang/zh-cn'; +import mitt from 'mitt'; -const app = createApp(App) -app.use(router).use(store, key).use(ElementPlus, { locale: lang }).mount('#app') -app.config.globalProperties.mittBus = mitt() +const app = createApp(App); +app.use(router).use(store, key).use(ElementPlus, { locale: lang }).mount('#app'); +app.config.globalProperties.mittBus = mitt(); -authDirective(app) +authDirective(app); diff --git a/src/router/index.ts b/src/router/index.ts index 7fd25e68..c2bb731e 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -1,907 +1,928 @@ -import { createRouter, createWebHashHistory, RouteRecordRaw } from "vue-router" -import NProgress from 'nprogress' -import 'nprogress/nprogress.css' -import { store } from "/@/store/index.ts" -import { getSession, clearSession } from "/@/utils/storage.ts" -import { getMenuAdmin, getMenuTest } from '/@/api/menu/index.ts' -import themeConfig from '/@/utils/themeConfig.ts' +import { createRouter, createWebHashHistory, RouteRecordRaw } from 'vue-router'; +import NProgress from 'nprogress'; +import 'nprogress/nprogress.css'; +import { store } from '/@/store/index.ts'; +import { getSession, clearSession } from '/@/utils/storage.ts'; +import { getMenuAdmin, getMenuTest } from '/@/api/menu/index.ts'; // 定义动态路由 export const dynamicRoutes = [ - { - path: '/', - name: '/', - component: () => import('/@/views/layout/index.vue'), - redirect: '/home', - meta: { - isKeepAlive: true - }, - children: [{ - path: '/home', - name: 'home', - component: () => import('/@/views/home/index.vue'), - meta: { - title: '首页', - isLink: '', - isHide: false, - isKeepAlive: true, - isAffix: true, - isIframe: false, - auth: ['admin', 'test'], - icon: 'iconfont icon-shouye' - } - }, - { - path: '/system', - name: 'system', - component: () => import('/@/views/layout/routerView/parent.vue'), - redirect: '/system/menu', - meta: { - title: '系统设置', - isLink: '', - isHide: false, - isKeepAlive: true, - isAffix: false, - isIframe: false, - auth: ['admin'], - icon: 'iconfont icon-xitongshezhi' - }, - children: [ - { - path: '/system/menu', - name: "systemMenu", - component: () => import('/@/views/system/menu/index.vue'), - meta: { - title: '菜单管理', - isLink: '', - isHide: false, - isKeepAlive: true, - isAffix: false, - isIframe: false, - auth: ['admin'], - icon: 'iconfont icon-caidan' - } - }, - { - path: '/system/user', - name: "systemUser", - component: () => import('/@/views/system/user/index.vue'), - meta: { - title: '用户管理', - isLink: '', - isHide: false, - isKeepAlive: true, - isAffix: false, - isIframe: false, - auth: ['admin'], - icon: 'iconfont icon-icon-', - } - } - ] - }, - { - path: '/limits', - name: 'limits', - component: () => import('/@/views/layout/routerView/parent.vue'), - redirect: '/limits/frontEnd', - meta: { - title: '权限管理', - isLink: '', - isHide: false, - isKeepAlive: true, - isAffix: false, - isIframe: false, - auth: ['admin', 'test'], - icon: 'iconfont icon-quanxian' - }, - children: [ - { - path: '/limits/frontEnd', - name: 'limitsFrontEnd', - component: () => import('/@/views/layout/routerView/parent.vue'), - redirect: '/limits/frontEnd/page', - meta: { - title: '前端控制', - isLink: '', - isHide: false, - isKeepAlive: true, - isAffix: false, - isIframe: false, - auth: ['admin', 'test'] - }, - children: [ - { - path: '/limits/frontEnd/page', - name: 'limitsFrontEndPage', - component: () => import('/@/views/limits/frontEnd/page/index.vue'), - meta: { - title: '页面权限', - isLink: '', - isHide: false, - isKeepAlive: true, - isAffix: false, - isIframe: false, - auth: ['admin', 'test'] - } - }, - { - path: '/limits/frontEnd/btn', - name: 'limitsFrontEndBtn', - component: () => import('/@/views/limits/frontEnd/btn/index.vue'), - meta: { - title: '按钮权限', - isLink: '', - isHide: false, - isKeepAlive: true, - isAffix: false, - isIframe: false, - auth: ['admin', 'test'] - } - } - ] - }, - { - path: '/limits/backEnd', - name: 'limitsBackEnd', - component: () => import('/@/views/layout/routerView/parent.vue'), - meta: { - title: '后端控制', - isLink: '', - isHide: false, - isKeepAlive: true, - isAffix: false, - isIframe: false, - auth: ['admin', 'test'] - }, - children: [ - { - path: '/limits/backEnd/page', - name: 'limitsBackEndEndPage', - component: () => import('/@/views/limits/backEnd/page/index.vue'), - meta: { - title: '页面权限', - isLink: '', - isHide: false, - isKeepAlive: true, - isAffix: false, - isIframe: false, - auth: ['admin', 'test'] - } - } - ] - } - ] - }, - { - path: '/menu', - name: 'menu', - component: () => import('/@/views/layout/routerView/parent.vue'), - redirect: '/menu/menu1', - meta: { - title: '菜单嵌套', - isLink: '', - isHide: false, - isKeepAlive: true, - isAffix: false, - isIframe: false, - auth: ['admin', 'test'], - icon: 'iconfont icon-caidan' - }, - children: [ - { - path: '/menu/menu1', - name: 'menu1', - component: () => import('/@/views/layout/routerView/parent.vue'), - redirect: '/menu/menu1/menu11', - meta: { - title: '菜单1', - isLink: '', - isHide: false, - isKeepAlive: true, - isAffix: false, - isIframe: false, - auth: ['admin', 'test'], - icon: 'iconfont icon-caidan' - }, - children: [ - { - path: '/menu/menu1/menu11', - name: 'menu11', - component: () => import('/@/views/menu/menu1/menu11/index.vue'), - meta: { - title: '菜单11', - isLink: '', - isHide: false, - isKeepAlive: true, - isAffix: false, - isIframe: false, - auth: ['admin', 'test'], - icon: 'iconfont icon-caidan' - } - }, - { - path: '/menu/menu1/menu12', - name: 'menu12', - component: () => import('/@/views/layout/routerView/parent.vue'), - redirect: '/menu/menu1/menu12/menu121', - meta: { - title: '菜单12', - isLink: '', - isHide: false, - isKeepAlive: true, - isAffix: false, - isIframe: false, - auth: ['admin', 'test'], - icon: 'iconfont icon-caidan' - }, - children: [ - { - path: '/menu/menu1/menu12/menu121', - name: 'menu121', - component: () => import('/@/views/menu/menu1/menu12/menu121/index.vue'), - meta: { - title: '菜单121', - isLink: '', - isHide: false, - isKeepAlive: true, - isAffix: false, - isIframe: false, - auth: ['admin', 'test'], - icon: 'iconfont icon-caidan' - } - }, - { - path: '/menu/menu1/menu12/menu122', - name: 'menu122', - component: () => import('/@/views/menu/menu1/menu12/menu122/index.vue'), - meta: { - title: '菜单122', - isLink: '', - isHide: false, - isKeepAlive: true, - isAffix: false, - isIframe: false, - auth: ['admin', 'test'], - icon: 'iconfont icon-caidan' - } - } - ] - }, - { - path: '/menu/menu1/menu13', - name: 'menu13', - component: () => import('/@/views/menu/menu1/menu13/index.vue'), - meta: { - title: '菜单13', - isLink: '', - isHide: false, - isKeepAlive: true, - isAffix: false, - isIframe: false, - auth: ['admin', 'test'], - icon: 'iconfont icon-caidan' - } - } - ] - }, - { - path: '/menu/menu2', - name: 'menu2', - component: () => import('/@/views/menu/menu2/index.vue'), - meta: { - title: '菜单2', - isLink: '', - isHide: false, - isKeepAlive: true, - isAffix: false, - isIframe: false, - auth: ['admin', 'test'], - icon: 'iconfont icon-caidan' - } - } - ] - }, - { - path: '/fun', - name: 'funIndex', - component: () => import('/@/views/layout/routerView/parent.vue'), - redirect: '/fun/tagsView', - meta: { - title: '功能', - isLink: '', - isHide: false, - isKeepAlive: true, - isAffix: false, - isIframe: false, - auth: ['admin', 'test'], - icon: 'iconfont icon-crew_feature' - }, - children: [ - { - path: '/fun/tagsView', - name: 'funTagsView', - component: () => import('/@/views/fun/tagsView/index.vue'), - meta: { - title: 'tagsView 操作', - isLink: '', - isHide: false, - isKeepAlive: true, - isAffix: false, - isIframe: false, - auth: ['admin', 'test'], - icon: 'el-icon-thumb' - } - }, - { - path: '/fun/countup', - name: 'countup', - component: () => import('/@/views/fun/countup/index.vue'), - meta: { - title: 'countup 数字滚动', - isLink: '', - isHide: false, - isKeepAlive: true, - isAffix: false, - isIframe: false, - auth: ['admin', 'test'], - icon: 'el-icon-odometer' - } - }, - { - path: '/fun/echartsTree', - name: 'echartsTree', - component: () => import('/@/views/fun/tree/index.vue'), - meta: { - title: 'echartsTree 树图', - isLink: '', - isHide: false, - isKeepAlive: true, - isAffix: false, - isIframe: false, - auth: ['admin', 'test'], - icon: 'el-icon-connection' - } - }, - { - path: '/fun/selector', - name: 'selector', - component: () => import('/@/views/fun/selector/index.vue'), - meta: { - title: '图标选择器', - isLink: '', - isHide: false, - isKeepAlive: true, - isAffix: false, - isIframe: false, - auth: ['admin', 'test'], - icon: 'iconfont icon-xuanzeqi' - } - }, - { - path: '/fun/wangEditor', - name: 'wangEditor', - component: () => import('/@/views/fun/wangEditor/index.vue'), - meta: { - title: 'wangEditor 编辑器', - isLink: '', - isHide: false, - isKeepAlive: true, - isAffix: false, - isIframe: false, - auth: ['admin', 'test'], - icon: 'iconfont icon-fuwenbenkuang' - } - }, - { - path: '/fun/cropper', - name: 'cropper', - component: () => import('/@/views/fun/cropper/index.vue'), - meta: { - title: 'cropper 图片裁剪', - isLink: '', - isHide: false, - isKeepAlive: true, - isAffix: false, - isIframe: false, - auth: ['admin', 'test'], - icon: 'iconfont icon-caijian' - } - }, - { - path: '/fun/mindMap', - name: 'mindMap', - component: () => import('/@/views/fun/mindMap/index.vue'), - meta: { - title: 'G6 思维导图', - isLink: '', - isHide: false, - isKeepAlive: true, - isAffix: false, - isIframe: false, - auth: ['admin', 'test'], - icon: 'iconfont icon-siweidaotu' - } - }, - { - path: '/fun/qrcode', - name: 'qrcode', - component: () => import('/@/views/fun/qrcode/index.vue'), - meta: { - title: 'qrcode 二维码生成', - isLink: '', - isHide: false, - isKeepAlive: true, - isAffix: false, - isIframe: false, - auth: ['admin', 'test'], - icon: 'iconfont icon-ico' - } - } - ] - }, - { - path: '/pages', - name: 'pagesIndex', - component: () => import('/@/views/layout/routerView/parent.vue'), - redirect: '/pages/filtering', - meta: { - title: '页面', - isLink: '', - isHide: false, - isKeepAlive: true, - isAffix: false, - isIframe: false, - auth: ['admin', 'test'], - icon: 'iconfont icon-fuzhiyemian' - }, - children: [ - { - path: '/pages/filtering', - name: 'filtering', - component: () => import('/@/views/pages/filtering/index.vue'), - meta: { - title: '过滤筛选组件', - isLink: '', - isHide: false, - isKeepAlive: true, - isAffix: false, - isIframe: false, - auth: ['admin', 'test'], - icon: 'el-icon-sell' - } - }, - { - path: '/pages/iocnfont', - name: 'iocnfont', - component: () => import('/@/views/pages/iocnfont/index.vue'), - meta: { - title: 'iconfont 字体图标', - isLink: '', - isHide: false, - isKeepAlive: true, - isAffix: false, - isIframe: false, - auth: ['admin', 'test'], - icon: 'el-icon-present' - } - }, - { - path: '/pages/element', - name: 'element', - component: () => import('/@/views/pages/element/index.vue'), - meta: { - title: 'element 字体图标', - isLink: '', - isHide: false, - isKeepAlive: true, - isAffix: false, - isIframe: false, - auth: ['admin', 'test'], - icon: 'el-icon-platform-eleme' - } - }, - { - path: '/pages/awesome', - name: 'awesome', - component: () => import('/@/views/pages/awesome/index.vue'), - meta: { - title: 'awesome 字体图标', - isLink: '', - isHide: false, - isKeepAlive: true, - isAffix: false, - isIframe: false, - auth: ['admin', 'test'], - icon: 'el-icon-set-up' - } - }, - { - path: '/pages/cityLinkage', - name: 'cityLinkage', - component: () => import('/@/views/pages/cityLinkage/index.vue'), - meta: { - title: '城市多级联动', - isLink: '', - isHide: false, - isKeepAlive: true, - isAffix: false, - isIframe: false, - auth: ['admin', 'test'], - icon: 'iconfont icon-jiliandongxuanzeqi' - } - }, - { - path: '/pages/formAdapt', - name: 'formAdapt', - component: () => import('/@/views/pages/formAdapt/index.vue'), - meta: { - title: '表单自适应', - isLink: '', - isHide: false, - isKeepAlive: true, - isAffix: false, - isIframe: false, - auth: ['admin', 'test'], - icon: 'iconfont icon-biaodan' - } - }, - { - path: '/pages/listAdapt', - name: 'listAdapt', - component: () => import('/@/views/pages/listAdapt/index.vue'), - meta: { - title: '列表自适应', - isLink: '', - isHide: false, - isKeepAlive: true, - isAffix: false, - isIframe: false, - auth: ['admin', 'test'], - icon: 'iconfont icon-chazhaobiaodanliebiao' - } - }, - ] - }, - { - path: '/chart', - name: 'chartIndex', - component: () => import('/@/views/chart/index.vue'), - meta: { - title: '大数据图表', - isLink: '', - isHide: false, - isKeepAlive: true, - isAffix: false, - isIframe: false, - auth: ['admin', 'test'], - icon: 'iconfont icon-ico_shuju' - } - }, - { - path: '/personal', - name: 'personal', - component: () => import('/@/views/personal/index.vue'), - meta: { - title: '个人中心', - isLink: '', - isHide: false, - isKeepAlive: true, - isAffix: false, - isIframe: false, - auth: ['admin', 'test'], - icon: 'iconfont icon-gerenzhongxin' - } - }, - { - path: '/tools', - name: 'tools', - component: () => import('/@/views/tools/index.vue'), - meta: { - title: '工具类集合', - isLink: '', - isHide: false, - isKeepAlive: true, - isAffix: false, - isIframe: false, - auth: ['admin', 'test'], - icon: 'iconfont icon-gongju' - } - }, - { - path: '/link', - name: 'layoutLinkView', - component: () => import('/@/views/layout/routerView/parent.vue'), - meta: { - title: '外链', - isLink: 'https://element-plus.gitee.io/#/zh-CN/component/installation', - isHide: false, - isKeepAlive: false, - isAffix: false, - isIframe: false, - auth: ['admin'], - icon: 'iconfont icon-caozuo-wailian' - } - }, - { - path: '/iframes', - name: 'layoutIfameView', - component: () => import('/@/views/layout/routerView/parent.vue'), - meta: { - title: '内嵌 iframe', - isLink: 'https://gitee.com/lyt-top/vue-admin-wonderful', - isHide: false, - isKeepAlive: true, - isAffix: true, - isIframe: true, - auth: ['admin'], - icon: 'iconfont icon-neiqianshujuchucun' - } - }] - } -] + { + path: '/', + name: '/', + component: () => import('/@/views/layout/index.vue'), + redirect: '/home', + meta: { + isKeepAlive: true, + }, + children: [ + { + path: '/home', + name: 'home', + component: () => import('/@/views/home/index.vue'), + meta: { + title: '首页', + isLink: '', + isHide: false, + isKeepAlive: true, + isAffix: true, + isIframe: false, + auth: ['admin', 'test'], + icon: 'iconfont icon-shouye', + }, + }, + { + path: '/system', + name: 'system', + component: () => import('/@/views/layout/routerView/parent.vue'), + redirect: '/system/menu', + meta: { + title: '系统设置', + isLink: '', + isHide: false, + isKeepAlive: true, + isAffix: false, + isIframe: false, + auth: ['admin'], + icon: 'iconfont icon-xitongshezhi', + }, + children: [ + { + path: '/system/menu', + name: 'systemMenu', + component: () => import('/@/views/system/menu/index.vue'), + meta: { + title: '菜单管理', + isLink: '', + isHide: false, + isKeepAlive: true, + isAffix: false, + isIframe: false, + auth: ['admin'], + icon: 'iconfont icon-caidan', + }, + }, + { + path: '/system/user', + name: 'systemUser', + component: () => import('/@/views/system/user/index.vue'), + meta: { + title: '用户管理', + isLink: '', + isHide: false, + isKeepAlive: true, + isAffix: false, + isIframe: false, + auth: ['admin'], + icon: 'iconfont icon-icon-', + }, + }, + ], + }, + { + path: '/limits', + name: 'limits', + component: () => import('/@/views/layout/routerView/parent.vue'), + redirect: '/limits/frontEnd', + meta: { + title: '权限管理', + isLink: '', + isHide: false, + isKeepAlive: true, + isAffix: false, + isIframe: false, + auth: ['admin', 'test'], + icon: 'iconfont icon-quanxian', + }, + children: [ + { + path: '/limits/frontEnd', + name: 'limitsFrontEnd', + component: () => import('/@/views/layout/routerView/parent.vue'), + redirect: '/limits/frontEnd/page', + meta: { + title: '前端控制', + isLink: '', + isHide: false, + isKeepAlive: true, + isAffix: false, + isIframe: false, + auth: ['admin', 'test'], + }, + children: [ + { + path: '/limits/frontEnd/page', + name: 'limitsFrontEndPage', + component: () => import('/@/views/limits/frontEnd/page/index.vue'), + meta: { + title: '页面权限', + isLink: '', + isHide: false, + isKeepAlive: true, + isAffix: false, + isIframe: false, + auth: ['admin', 'test'], + }, + }, + { + path: '/limits/frontEnd/btn', + name: 'limitsFrontEndBtn', + component: () => import('/@/views/limits/frontEnd/btn/index.vue'), + meta: { + title: '按钮权限', + isLink: '', + isHide: false, + isKeepAlive: true, + isAffix: false, + isIframe: false, + auth: ['admin', 'test'], + }, + }, + ], + }, + { + path: '/limits/backEnd', + name: 'limitsBackEnd', + component: () => import('/@/views/layout/routerView/parent.vue'), + meta: { + title: '后端控制', + isLink: '', + isHide: false, + isKeepAlive: true, + isAffix: false, + isIframe: false, + auth: ['admin', 'test'], + }, + children: [ + { + path: '/limits/backEnd/page', + name: 'limitsBackEndEndPage', + component: () => import('/@/views/limits/backEnd/page/index.vue'), + meta: { + title: '页面权限', + isLink: '', + isHide: false, + isKeepAlive: true, + isAffix: false, + isIframe: false, + auth: ['admin', 'test'], + }, + }, + ], + }, + ], + }, + { + path: '/menu', + name: 'menu', + component: () => import('/@/views/layout/routerView/parent.vue'), + redirect: '/menu/menu1', + meta: { + title: '菜单嵌套', + isLink: '', + isHide: false, + isKeepAlive: true, + isAffix: false, + isIframe: false, + auth: ['admin', 'test'], + icon: 'iconfont icon-caidan', + }, + children: [ + { + path: '/menu/menu1', + name: 'menu1', + component: () => import('/@/views/layout/routerView/parent.vue'), + redirect: '/menu/menu1/menu11', + meta: { + title: '菜单1', + isLink: '', + isHide: false, + isKeepAlive: true, + isAffix: false, + isIframe: false, + auth: ['admin', 'test'], + icon: 'iconfont icon-caidan', + }, + children: [ + { + path: '/menu/menu1/menu11', + name: 'menu11', + component: () => import('/@/views/menu/menu1/menu11/index.vue'), + meta: { + title: '菜单11', + isLink: '', + isHide: false, + isKeepAlive: true, + isAffix: false, + isIframe: false, + auth: ['admin', 'test'], + icon: 'iconfont icon-caidan', + }, + }, + { + path: '/menu/menu1/menu12', + name: 'menu12', + component: () => import('/@/views/layout/routerView/parent.vue'), + redirect: '/menu/menu1/menu12/menu121', + meta: { + title: '菜单12', + isLink: '', + isHide: false, + isKeepAlive: true, + isAffix: false, + isIframe: false, + auth: ['admin', 'test'], + icon: 'iconfont icon-caidan', + }, + children: [ + { + path: '/menu/menu1/menu12/menu121', + name: 'menu121', + component: () => import('/@/views/menu/menu1/menu12/menu121/index.vue'), + meta: { + title: '菜单121', + isLink: '', + isHide: false, + isKeepAlive: true, + isAffix: false, + isIframe: false, + auth: ['admin', 'test'], + icon: 'iconfont icon-caidan', + }, + }, + { + path: '/menu/menu1/menu12/menu122', + name: 'menu122', + component: () => import('/@/views/menu/menu1/menu12/menu122/index.vue'), + meta: { + title: '菜单122', + isLink: '', + isHide: false, + isKeepAlive: true, + isAffix: false, + isIframe: false, + auth: ['admin', 'test'], + icon: 'iconfont icon-caidan', + }, + }, + ], + }, + { + path: '/menu/menu1/menu13', + name: 'menu13', + component: () => import('/@/views/menu/menu1/menu13/index.vue'), + meta: { + title: '菜单13', + isLink: '', + isHide: false, + isKeepAlive: true, + isAffix: false, + isIframe: false, + auth: ['admin', 'test'], + icon: 'iconfont icon-caidan', + }, + }, + ], + }, + { + path: '/menu/menu2', + name: 'menu2', + component: () => import('/@/views/menu/menu2/index.vue'), + meta: { + title: '菜单2', + isLink: '', + isHide: false, + isKeepAlive: true, + isAffix: false, + isIframe: false, + auth: ['admin', 'test'], + icon: 'iconfont icon-caidan', + }, + }, + ], + }, + { + path: '/fun', + name: 'funIndex', + component: () => import('/@/views/layout/routerView/parent.vue'), + redirect: '/fun/tagsView', + meta: { + title: '功能', + isLink: '', + isHide: false, + isKeepAlive: true, + isAffix: false, + isIframe: false, + auth: ['admin', 'test'], + icon: 'iconfont icon-crew_feature', + }, + children: [ + { + path: '/fun/tagsView', + name: 'funTagsView', + component: () => import('/@/views/fun/tagsView/index.vue'), + meta: { + title: 'tagsView 操作', + isLink: '', + isHide: false, + isKeepAlive: true, + isAffix: false, + isIframe: false, + auth: ['admin', 'test'], + icon: 'el-icon-thumb', + }, + }, + { + path: '/fun/countup', + name: 'countup', + component: () => import('/@/views/fun/countup/index.vue'), + meta: { + title: 'countup 数字滚动', + isLink: '', + isHide: false, + isKeepAlive: true, + isAffix: false, + isIframe: false, + auth: ['admin', 'test'], + icon: 'el-icon-odometer', + }, + }, + { + path: '/fun/echartsTree', + name: 'echartsTree', + component: () => import('/@/views/fun/tree/index.vue'), + meta: { + title: 'echartsTree 树图', + isLink: '', + isHide: false, + isKeepAlive: true, + isAffix: false, + isIframe: false, + auth: ['admin', 'test'], + icon: 'el-icon-connection', + }, + }, + { + path: '/fun/selector', + name: 'selector', + component: () => import('/@/views/fun/selector/index.vue'), + meta: { + title: '图标选择器', + isLink: '', + isHide: false, + isKeepAlive: true, + isAffix: false, + isIframe: false, + auth: ['admin', 'test'], + icon: 'iconfont icon-xuanzeqi', + }, + }, + { + path: '/fun/wangEditor', + name: 'wangEditor', + component: () => import('/@/views/fun/wangEditor/index.vue'), + meta: { + title: 'wangEditor 编辑器', + isLink: '', + isHide: false, + isKeepAlive: true, + isAffix: false, + isIframe: false, + auth: ['admin', 'test'], + icon: 'iconfont icon-fuwenbenkuang', + }, + }, + { + path: '/fun/cropper', + name: 'cropper', + component: () => import('/@/views/fun/cropper/index.vue'), + meta: { + title: 'cropper 图片裁剪', + isLink: '', + isHide: false, + isKeepAlive: true, + isAffix: false, + isIframe: false, + auth: ['admin', 'test'], + icon: 'iconfont icon-caijian', + }, + }, + { + path: '/fun/mindMap', + name: 'mindMap', + component: () => import('/@/views/fun/mindMap/index.vue'), + meta: { + title: 'G6 思维导图', + isLink: '', + isHide: false, + isKeepAlive: true, + isAffix: false, + isIframe: false, + auth: ['admin', 'test'], + icon: 'iconfont icon-siweidaotu', + }, + }, + { + path: '/fun/qrcode', + name: 'qrcode', + component: () => import('/@/views/fun/qrcode/index.vue'), + meta: { + title: 'qrcode 二维码生成', + isLink: '', + isHide: false, + isKeepAlive: true, + isAffix: false, + isIframe: false, + auth: ['admin', 'test'], + icon: 'iconfont icon-ico', + }, + }, + { + path: '/fun/echartsMap', + name: 'echartsMap', + component: () => import('/@/views/fun/echartsMap/index.vue'), + meta: { + title: '地理坐标/地图', + isLink: '', + isHide: false, + isKeepAlive: true, + isAffix: false, + isIframe: false, + auth: ['admin', 'test'], + icon: 'iconfont icon-ditu', + }, + }, + ], + }, + { + path: '/pages', + name: 'pagesIndex', + component: () => import('/@/views/layout/routerView/parent.vue'), + redirect: '/pages/filtering', + meta: { + title: '页面', + isLink: '', + isHide: false, + isKeepAlive: true, + isAffix: false, + isIframe: false, + auth: ['admin', 'test'], + icon: 'iconfont icon-fuzhiyemian', + }, + children: [ + { + path: '/pages/filtering', + name: 'filtering', + component: () => import('/@/views/pages/filtering/index.vue'), + meta: { + title: '过滤筛选组件', + isLink: '', + isHide: false, + isKeepAlive: true, + isAffix: false, + isIframe: false, + auth: ['admin', 'test'], + icon: 'el-icon-sell', + }, + }, + { + path: '/pages/iocnfont', + name: 'iocnfont', + component: () => import('/@/views/pages/iocnfont/index.vue'), + meta: { + title: 'iconfont 字体图标', + isLink: '', + isHide: false, + isKeepAlive: true, + isAffix: false, + isIframe: false, + auth: ['admin', 'test'], + icon: 'el-icon-present', + }, + }, + { + path: '/pages/element', + name: 'element', + component: () => import('/@/views/pages/element/index.vue'), + meta: { + title: 'element 字体图标', + isLink: '', + isHide: false, + isKeepAlive: true, + isAffix: false, + isIframe: false, + auth: ['admin', 'test'], + icon: 'el-icon-platform-eleme', + }, + }, + { + path: '/pages/awesome', + name: 'awesome', + component: () => import('/@/views/pages/awesome/index.vue'), + meta: { + title: 'awesome 字体图标', + isLink: '', + isHide: false, + isKeepAlive: true, + isAffix: false, + isIframe: false, + auth: ['admin', 'test'], + icon: 'el-icon-set-up', + }, + }, + { + path: '/pages/cityLinkage', + name: 'cityLinkage', + component: () => import('/@/views/pages/cityLinkage/index.vue'), + meta: { + title: '城市多级联动', + isLink: '', + isHide: false, + isKeepAlive: true, + isAffix: false, + isIframe: false, + auth: ['admin', 'test'], + icon: 'iconfont icon-jiliandongxuanzeqi', + }, + }, + { + path: '/pages/formAdapt', + name: 'formAdapt', + component: () => import('/@/views/pages/formAdapt/index.vue'), + meta: { + title: '表单自适应', + isLink: '', + isHide: false, + isKeepAlive: true, + isAffix: false, + isIframe: false, + auth: ['admin', 'test'], + icon: 'iconfont icon-biaodan', + }, + }, + { + path: '/pages/listAdapt', + name: 'listAdapt', + component: () => import('/@/views/pages/listAdapt/index.vue'), + meta: { + title: '列表自适应', + isLink: '', + isHide: false, + isKeepAlive: true, + isAffix: false, + isIframe: false, + auth: ['admin', 'test'], + icon: 'iconfont icon-chazhaobiaodanliebiao', + }, + }, + ], + }, + { + path: '/chart', + name: 'chartIndex', + component: () => import('/@/views/chart/index.vue'), + meta: { + title: '大数据图表', + isLink: '', + isHide: false, + isKeepAlive: true, + isAffix: false, + isIframe: false, + auth: ['admin', 'test'], + icon: 'iconfont icon-ico_shuju', + }, + }, + { + path: '/personal', + name: 'personal', + component: () => import('/@/views/personal/index.vue'), + meta: { + title: '个人中心', + isLink: '', + isHide: false, + isKeepAlive: true, + isAffix: false, + isIframe: false, + auth: ['admin', 'test'], + icon: 'iconfont icon-gerenzhongxin', + }, + }, + { + path: '/tools', + name: 'tools', + component: () => import('/@/views/tools/index.vue'), + meta: { + title: '工具类集合', + isLink: '', + isHide: false, + isKeepAlive: true, + isAffix: false, + isIframe: false, + auth: ['admin', 'test'], + icon: 'iconfont icon-gongju', + }, + }, + { + path: '/link', + name: 'layoutLinkView', + component: () => import('/@/views/layout/routerView/parent.vue'), + meta: { + title: '外链', + isLink: 'https://element-plus.gitee.io/#/zh-CN/component/installation', + isHide: false, + isKeepAlive: false, + isAffix: false, + isIframe: false, + auth: ['admin'], + icon: 'iconfont icon-caozuo-wailian', + }, + }, + { + path: '/iframes', + name: 'layoutIfameView', + component: () => import('/@/views/layout/routerView/parent.vue'), + meta: { + title: '内嵌 iframe', + isLink: 'https://gitee.com/lyt-top/vue-admin-wonderful', + isHide: false, + isKeepAlive: false, + isAffix: true, + isIframe: true, + auth: ['admin'], + icon: 'iconfont icon-neiqianshujuchucun', + }, + }, + ], + }, +]; // 定义静态路由 const staticRoutes: Array = [ - { - path: '/login', - name: 'login', - component: () => import('/@/views/login/index.vue'), - meta: { - title: '登陆' - } - }, - { - path: '/404', - name: 'notFound', - component: () => import('/@/views/error/404.vue'), - meta: { - title: '找不到此页面' - } - }, - { - path: '/401', - name: 'noPower', - component: () => import('/@/views/error/401.vue'), - meta: { - title: '没有权限' - } - }, -] + { + path: '/login', + name: 'login', + component: () => import('/@/views/login/index.vue'), + meta: { + title: '登陆', + }, + }, + { + path: '/404', + name: 'notFound', + component: () => import('/@/views/error/404.vue'), + meta: { + title: '找不到此页面', + }, + }, + { + path: '/401', + name: 'noPower', + component: () => import('/@/views/error/401.vue'), + meta: { + title: '没有权限', + }, + }, +]; // 定义404界面 const pathMatch = { - path: '/:path(.*)*', - redirect: '/404' -} + path: '/:path(.*)*', + redirect: '/404', +}; // 获取目录下的 .vue 全部文件,参考 vite:import.meta.glob -const dynamicViewsModules = import.meta.glob('../views/**/*.{vue,tsx}') +const dynamicViewsModules = import.meta.glob('../views/**/*.{vue,tsx}'); // 添加静态路由 const router = createRouter({ - history: createWebHashHistory(), - routes: staticRoutes -}) + history: createWebHashHistory(), + routes: staticRoutes, +}); // 后端控制路由,isRequestRoutes 为 true,则开启后端控制路由 export function getBackEndControlRoutes(callback: any) { - const token = getSession('token') - if (!token) return false - store.dispatch('setUserInfos') - const auth = store.state.userInfos.authPageList[0] // 模拟 admin 与 test - if (auth === 'admin') { - getMenuAdmin().then((res: any) => { - callback(res) - }) - } else { - getMenuTest().then((res: any) => { - callback(res) - }) - } + const token = getSession('token'); + if (!token) return false; + store.dispatch('userInfos/setUserInfos'); + const auth = store.state.userInfos.userInfos.authPageList[0]; // 模拟 admin 与 test + if (auth === 'admin') { + getMenuAdmin() + .then((res: any) => { + callback(res); + }) + .catch(() => {}); + } else { + getMenuTest() + .then((res: any) => { + callback(res); + }) + .catch(() => {}); + } } // 后端控制路由,模拟执行路由数据初始化 export function setBackEndControlRoutesFun(res: any, callback?: any) { - initBackEndControlRoutesFun(res) - window.location.href = window.location.href // 防止页面刷新时,出现空白或404 - callback(res) + initBackEndControlRoutesFun(res); + window.location.href = window.location.href; // 防止页面刷新时,出现空白或404 + callback(res); } // 后端控制路由,动态添加菜单时(刷新菜单) export function setBackEndControlRefreshRoutes() { - getBackEndControlRoutes((res: any) => { - initBackEndControlRoutesFun(res) - }) + getBackEndControlRoutes((res: any) => { + initBackEndControlRoutesFun(res); + }); } // 后端控制路由,模拟执行路由数据初始化 const initBackEndControlRoutesFun = (res: any) => { - const oldRoutes = JSON.parse(JSON.stringify(res.data)) - store.dispatch('setBackEndControlRoutes', oldRoutes) - dynamicRoutes[0].children = backEndRouter(res.data) - resetRoute() // 删除/重置路由 - router.addRoute(pathMatch) // 添加404界面 - setAddRoute() // 添加动态路由 - setFilterMenu() // 过滤权限菜单 - setCacheTagsViewRoutes() // 添加 keepAlive 缓存 -} + const oldRoutes = JSON.parse(JSON.stringify(res.data)); + store.dispatch('requestOldRoutes/setBackEndControlRoutes', oldRoutes); + dynamicRoutes[0].children = backEndRouter(res.data); + resetRoute(); // 删除/重置路由 + router.addRoute(pathMatch); // 添加404界面 + setAddRoute(); // 添加动态路由 + setFilterMenu(); // 过滤权限菜单 + setCacheTagsViewRoutes(); // 添加 keepAlive 缓存 +}; // 后端控制路由,后端路由 component 转换 export function backEndRouter(routes: any) { - if (!routes) return - return routes.map((item: any) => { - const { component } = item - const { children } = item - if (component) item.component = dynamicImport(dynamicViewsModules, component as string) - children && backEndRouter(children) - return item - }) + if (!routes) return; + return routes.map((item: any) => { + const { component } = item; + const { children } = item; + if (component) item.component = dynamicImport(dynamicViewsModules, component as string); + children && backEndRouter(children); + return item; + }); } // 后端控制路由,后端路由 component 转换函数 -export function dynamicImport( - dynamicViewsModules: Record Promise<{ [key: string]: any }>>, - component: string -) { - const keys = Object.keys(dynamicViewsModules) - const matchKeys = keys.filter((key) => { - const k = key.replace('../views', '') - return k.startsWith(`${component}`) || k.startsWith(`/${component}`) - }) - if (matchKeys?.length === 1) { - const matchKey = matchKeys[0] - return dynamicViewsModules[matchKey] - } - if (matchKeys?.length > 1) { - console.warn('Do not create files that do not end with. Vue') - return false - } +export function dynamicImport(dynamicViewsModules: Record Promise<{ [key: string]: any }>>, component: string) { + const keys = Object.keys(dynamicViewsModules); + const matchKeys = keys.filter((key) => { + const k = key.replace('../views', ''); + return k.startsWith(`${component}`) || k.startsWith(`/${component}`); + }); + if (matchKeys?.length === 1) { + const matchKey = matchKeys[0]; + return dynamicViewsModules[matchKey]; + } + if (matchKeys?.length > 1) { + console.warn('Do not create files that do not end with. Vue'); + return false; + } } // 多级嵌套数组处理成一维数组 export function formatFlatteningRoutes(arr: any) { - if (arr.length < 0) return false - for (let i = 0; i < arr.length; i++) { - if (arr[i].children) { - arr = arr.slice(0, i + 1).concat(arr[i].children, arr.slice(i + 1)) - } - } - return arr + if (arr.length < 0) return false; + for (let i = 0; i < arr.length; i++) { + if (arr[i].children) { + arr = arr.slice(0, i + 1).concat(arr[i].children, arr.slice(i + 1)); + } + } + return arr; } // 多级嵌套数组处理后的一维数组,再处理成 `定义动态路由` 的格式 // 只保留二级:也就是二级以上全部处理成只有二级,keep-alive 支持二级缓存 // isKeepAlive 处理 `name` 值,进行缓存。顶级关闭,全部不缓存 export function formatTwoStageRoutes(arr: any) { - if (arr.length < 0) return false - const newArr: any = [] - const cacheList: Array = [] - arr.map((v: any) => { - if (v.path === '/') { - newArr.push({ component: v.component, name: v.name, path: v.path, redirect: v.redirect, meta: v.meta, children: [] }) - } else { - newArr[0].children.push({ ...v }) - if (newArr[0].meta.isKeepAlive && v.meta.isKeepAlive) { - cacheList.push(v.name) - store.dispatch('setCacheKeepAlive', cacheList) - } - } - }) - return newArr + if (arr.length < 0) return false; + const newArr: any = []; + const cacheList: Array = []; + arr.map((v: any) => { + if (v.path === '/') { + newArr.push({ component: v.component, name: v.name, path: v.path, redirect: v.redirect, meta: v.meta, children: [] }); + } else { + newArr[0].children.push({ ...v }); + if (newArr[0].meta.isKeepAlive && v.meta.isKeepAlive) { + cacheList.push(v.name); + store.dispatch('keepAliveNames/setCacheKeepAlive', cacheList); + } + } + }); + return newArr; } // 缓存多级嵌套数组处理后的一维数组(tagsView、菜单搜索中使用:未过滤隐藏的(isHide)) export function setCacheTagsViewRoutes() { - // 先处理有权限的路由,否则 tagsView、菜单搜索中无权限的路由也将显示 - let authsRoutes = setFilterMenuFun(dynamicRoutes, store.state.userInfos.authPageList) - // 添加到 vuex setTagsViewRoutes 中 - store.dispatch('setTagsViewRoutes', formatTwoStageRoutes(formatFlatteningRoutes(authsRoutes))[0].children) + // 先处理有权限的路由,否则 tagsView、菜单搜索中无权限的路由也将显示 + let authsRoutes = setFilterMenuFun(dynamicRoutes, store.state.userInfos.userInfos.authPageList); + // 添加到 vuex setTagsViewRoutes 中 + store.dispatch('tagsViewRoutes/setTagsViewRoutes', formatTwoStageRoutes(formatFlatteningRoutes(authsRoutes))[0].children); } // 获取当前用户的权限去比对路由表,用于左侧菜单/横向菜单的显示 export function setFilterMenu() { - store.dispatch("setRoutes", setFilterMenuFun(dynamicRoutes[0].children, store.state.userInfos.authPageList)) + store.dispatch('routesList/setRoutesList', setFilterMenuFun(dynamicRoutes[0].children, store.state.userInfos.userInfos.authPageList)); } // 判断路由 auth 中是否包含当前登录用户权限字段 export function hasAuth(auths: any, route: any) { - if (route.meta && route.meta.auth) return auths.some((auth: any) => route.meta.auth.includes(auth)) - else return true + if (route.meta && route.meta.auth) return auths.some((auth: any) => route.meta.auth.includes(auth)); + else return true; } // 递归过滤有权限的路由 export function setFilterMenuFun(routes: any, auth: any) { - const menu: any = [] - routes.map((route: any) => { - const item = { ...route } - if (hasAuth(auth, item)) { - if (item.children) item.children = setFilterMenuFun(item.children, auth) - menu.push(item) - } - }) - return menu + const menu: any = []; + routes.map((route: any) => { + const item = { ...route }; + if (hasAuth(auth, item)) { + if (item.children) item.children = setFilterMenuFun(item.children, auth); + menu.push(item); + } + }); + return menu; } // 获取当前用户的权限去比对路由表,用于动态路由的添加 export function setFilterRoute() { - let filterRoute: any = [] - formatTwoStageRoutes(formatFlatteningRoutes(dynamicRoutes))[0].children.map((route: any) => { - if (route.meta.auth) route.meta.auth.map((metaAuth: any) => { - store.state.userInfos.authPageList.map((auth: any) => { - if (metaAuth === auth) filterRoute.push({ ...route }) - }) - }) - }) - return filterRoute + let filterRoute: any = []; + formatTwoStageRoutes(formatFlatteningRoutes(dynamicRoutes))[0].children.map((route: any) => { + if (route.meta.auth) + route.meta.auth.map((metaAuth: any) => { + store.state.userInfos.userInfos.authPageList.map((auth: any) => { + if (metaAuth === auth) filterRoute.push({ ...route }); + }); + }); + }); + return filterRoute; } // 比对后的路由表,进行重新赋值 export function setFilterRouteEnd() { - let filterRouteEnd: any = formatTwoStageRoutes(formatFlatteningRoutes(dynamicRoutes)) - filterRouteEnd[0].children = setFilterRoute() - return filterRouteEnd + let filterRouteEnd: any = formatTwoStageRoutes(formatFlatteningRoutes(dynamicRoutes)); + filterRouteEnd[0].children = setFilterRoute(); + return filterRouteEnd; } // 添加动态路由 export function setAddRoute() { - setFilterRouteEnd().map((route: any) => { - router.addRoute((route as unknown) as RouteRecordRaw) - }) + setFilterRouteEnd().map((route: any) => { + router.addRoute((route as unknown) as RouteRecordRaw); + }); } // 删除/重置路由 export function resetRoute() { - setFilterRouteEnd().map((route: any) => { - const { name } = route - router.hasRoute(name) && router.removeRoute(name) - }) + setFilterRouteEnd().map((route: any) => { + const { name } = route; + router.hasRoute(name) && router.removeRoute(name); + }); } -// 初始化方法,防止刷新时丢失 +// 初始化方法,防止刷新时丢失 export function initAllFun() { - const token = getSession('token') - if (!token) return false - store.dispatch('setUserInfos') // 触发初始化用户信息 - setAddRoute() // 添加动态路由 - router.addRoute(pathMatch) // 添加404界面 - setFilterMenu() // 过滤权限菜单 - setCacheTagsViewRoutes() // 添加 keepAlive 缓存 + const token = getSession('token'); + if (!token) return false; + store.dispatch('userInfos/setUserInfos'); // 触发初始化用户信息 + setAddRoute(); // 添加动态路由 + router.addRoute(pathMatch); // 添加404界面 + setFilterMenu(); // 过滤权限菜单 + setCacheTagsViewRoutes(); // 添加 keepAlive 缓存 } // 初始化方法执行 -const requestRoutes = store.state.themeConfig.isRequestRoutes -if (!requestRoutes) initAllFun() +const requestRoutes = store.state.themeConfig.themeConfig.isRequestRoutes; +if (!requestRoutes) initAllFun(); // 后端控制路由,isRequestRoutes 为 true,则开启后端控制路由 -if (requestRoutes) getBackEndControlRoutes((res: any) => { setBackEndControlRoutesFun(res) }) +if (requestRoutes) + getBackEndControlRoutes((res: any) => { + setBackEndControlRoutesFun(res); + }); // 路由加载前 router.beforeEach((to, from, next) => { - document.title = `${to.meta.title} - ${themeConfig.globalTitle}` || themeConfig.globalTitle - NProgress.configure({ showSpinner: false }) - if (to.meta.title) NProgress.start() - const token = getSession('token') - if (to.path === '/login' && !token) { - next() - NProgress.done() - } else { - if (!token) { - next('/login') - clearSession() - resetRoute() - NProgress.done() - } else if (token && to.path === '/login') { - next('/home') - NProgress.done() - } else { - next() - } - } -}) + document.title = `${to.meta.title} - ${store.state.themeConfig.themeConfig.globalTitle}` || store.state.themeConfig.themeConfig.globalTitle; + NProgress.configure({ showSpinner: false }); + if (to.meta.title) NProgress.start(); + const token = getSession('token'); + if (to.path === '/login' && !token) { + next(); + NProgress.done(); + } else { + if (!token) { + next('/login'); + clearSession(); + resetRoute(); + NProgress.done(); + } else if (token && to.path === '/login') { + next('/home'); + NProgress.done(); + } else { + next(); + } + } +}); // 路由加载后 router.afterEach(() => { - NProgress.done() -}) + NProgress.done(); +}); // 导出路由 -export default router \ No newline at end of file +export default router; diff --git a/src/store/index.ts b/src/store/index.ts index db7816b6..baa71c4e 100644 --- a/src/store/index.ts +++ b/src/store/index.ts @@ -1,128 +1,25 @@ -import { InjectionKey } from 'vue' -import { createStore, useStore as baseUseStore, Store } from 'vuex' -import themeConfig from '/@/utils/themeConfig.ts' -import { getSession } from "/@/utils/storage.ts"; -export interface RootStateTypes { - themeConfig: { - isDrawer: boolean, - primary: string, - success: string, - info: string, - warning: string, - danger: string, - topBar: string, - menuBar: string, - columnsMenuBar: string, - topBarColor: string, - menuBarColor: string, - columnsMenuBarColor: string, - isTopBarColorGradual: boolean, - isMenuBarColorGradual: boolean, - isMenuBarColorHighlight: boolean, - isCollapse: boolean, - isUniqueOpened: boolean, - isFixedHeader: boolean, - isFixedHeaderChange: boolean, - isClassicSplitMenu: boolean, - isLockScreen: boolean, - lockScreenTime: number, - isShowLogo: boolean, - isShowLogoChange: boolean, - isBreadcrumb: boolean, - isTagsview: boolean, - isBreadcrumbIcon: boolean, - isTagsviewIcon: boolean, - isCacheTagsView: boolean, - isSortableTagsView: boolean, - isFooter: boolean, - isGrayscale: boolean, - isInvert: boolean, - isWartermark: boolean, - wartermarkText: string, - tagsStyle: string, - animation: string, - columnsAsideStyle: string, - layout: string, - isRequestRoutes: boolean, - globalTitle: string, - globalViceTitle: string, - }, - routes: Array, - keepAliveNames: Array, - tagsViewRoutes: Array, - userInfos: object, - requestOldRoutes: Array, -} +import { InjectionKey } from 'vue'; +import { createStore, useStore as baseUseStore, Store } from 'vuex'; +import themeConfig from '/@/store/modules/themeConfig.ts'; +import routesList from '/@/store/modules/routesList.ts'; +import keepAliveNames from '/@/store/modules/keepAliveNames.ts'; +import tagsViewRoutes from '/@/store/modules/tagsViewRoutes.ts'; +import userInfos from '/@/store/modules/userInfos.ts'; +import requestOldRoutes from '/@/store/modules/requestOldRoutes.ts'; -export const key: InjectionKey> = Symbol() +export const key: InjectionKey> = Symbol(); export const store = createStore({ - state: { - themeConfig, - routes: [], - keepAliveNames: [], - tagsViewRoutes: [], - userInfos: {}, - requestOldRoutes: [] - }, - mutations: { - // 设置布局配置 - getThemeConfig(state: any, data: object) { - state.themeConfig = Object.assign({}, data) - }, - // 设置路由,菜单中使用到 - getRoutes(state: any, data: Array) { - state.routes = data - }, - // 设置缓存(name字段) - getCacheKeepAlive(state: any, data: Array) { - state.keepAliveNames = data - }, - // 设置 TagsView 路由 - getTagsViewRoutes(state: any, data: Array) { - state.tagsViewRoutes = data - }, - // 设置用户信息 - getUserInfos(state: any, data: object) { - state.userInfos = data - }, - // 后端控制路由 - getBackEndControlRoutes(state: any, data: object) { - state.requestOldRoutes = data - }, - }, - actions: { - // 设置布局配置 - setThemeConfig({ commit }, data: object) { - commit('getThemeConfig', data) - }, - // 设置路由,菜单中使用到 - async setRoutes({ commit }, data: any) { - commit('getRoutes', data) - }, - // 设置缓存(name字段) - async setCacheKeepAlive({ commit }, data: Array) { - commit('getCacheKeepAlive', data) - }, - // 设置 TagsView 路由 - async setTagsViewRoutes({ commit }, data: Array) { - commit('getTagsViewRoutes', data) - }, - // 设置用户信息 - async setUserInfos({ commit }, data: object) { - if (data) { - commit('getUserInfos', data) - } else { - if (getSession('userInfo')) commit('getUserInfos', getSession('userInfo')) - } - }, - // 后端控制路由 - setBackEndControlRoutes({ commit }, routes: Array) { - commit('getBackEndControlRoutes', routes) - } - } -}) + modules: { + themeConfig, + routesList, + keepAliveNames, + tagsViewRoutes, + userInfos, + requestOldRoutes, + }, +}); export function useStore() { - return baseUseStore(key) -} \ No newline at end of file + return baseUseStore(key); +} diff --git a/src/store/interface/index.ts b/src/store/interface/index.ts new file mode 100644 index 00000000..de1d1a7f --- /dev/null +++ b/src/store/interface/index.ts @@ -0,0 +1,84 @@ +// 接口类型声明 + +// 布局配置 +declare interface ThemeConfigState { + themeConfig: { + isDrawer: boolean; + primary: string; + success: string; + info: string; + warning: string; + danger: string; + topBar: string; + menuBar: string; + columnsMenuBar: string; + topBarColor: string; + menuBarColor: string; + columnsMenuBarColor: string; + isTopBarColorGradual: boolean; + isMenuBarColorGradual: boolean; + isMenuBarColorHighlight: boolean; + isCollapse: boolean; + isUniqueOpened: boolean; + isFixedHeader: boolean; + isFixedHeaderChange: boolean; + isClassicSplitMenu: boolean; + isLockScreen: boolean; + lockScreenTime: number; + isShowLogo: boolean; + isShowLogoChange: boolean; + isBreadcrumb: boolean; + isTagsview: boolean; + isBreadcrumbIcon: boolean; + isTagsviewIcon: boolean; + isCacheTagsView: boolean; + isSortableTagsView: boolean; + isFooter: boolean; + isGrayscale: boolean; + isInvert: boolean; + isWartermark: boolean; + wartermarkText: string; + tagsStyle: string; + animation: string; + columnsAsideStyle: string; + layout: string; + isRequestRoutes: boolean; + globalTitle: string; + globalViceTitle: string; + }; +} + +// 路由列表 +declare interface RoutesListState { + routesList: Array; +} + +// 路由缓存列表 +declare interface KeepAliveNamesState { + keepAliveNames: Array; +} + +// TagsView 路由列表 +declare interface TagsViewRoutesState { + tagsViewRoutes: Array; +} + +// 用户信息 +declare interface UserInfosState { + userInfos: object; +} + +// 后端返回原始路由(未处理时) +declare interface RequestOldRoutesState { + requestOldRoutes: Array; +} + +// 主接口(顶级类型声明) +declare interface RootStateTypes { + themeConfig: ThemeConfigState; + routesList: RoutesListState; + keepAliveNames: KeepAliveNamesState; + tagsViewRoutes: TagsViewRoutesState; + userInfos: UserInfosState; + requestOldRoutes: RequestOldRoutesState; +} diff --git a/src/store/modules/keepAliveNames.ts b/src/store/modules/keepAliveNames.ts new file mode 100644 index 00000000..4a56f477 --- /dev/null +++ b/src/store/modules/keepAliveNames.ts @@ -0,0 +1,22 @@ +import { Module } from 'vuex'; + +const keepAliveNamesModule: Module = { + namespaced: true, + state: { + keepAliveNames: [], + }, + mutations: { + // 设置路由缓存(name字段) + getCacheKeepAlive(state: any, data: Array) { + state.keepAliveNames = data; + }, + }, + actions: { + // 设置路由缓存(name字段) + async setCacheKeepAlive({ commit }, data: Array) { + commit('getCacheKeepAlive', data); + }, + }, +}; + +export default keepAliveNamesModule; diff --git a/src/store/modules/requestOldRoutes.ts b/src/store/modules/requestOldRoutes.ts new file mode 100644 index 00000000..71892e40 --- /dev/null +++ b/src/store/modules/requestOldRoutes.ts @@ -0,0 +1,22 @@ +import { Module } from 'vuex'; + +const requestOldRoutesModule: Module = { + namespaced: true, + state: { + requestOldRoutes: [], + }, + mutations: { + // 后端控制路由 + getBackEndControlRoutes(state: any, data: object) { + state.requestOldRoutes = data; + }, + }, + actions: { + // 后端控制路由 + setBackEndControlRoutes({ commit }, routes: Array) { + commit('getBackEndControlRoutes', routes); + }, + }, +}; + +export default requestOldRoutesModule; diff --git a/src/store/modules/routesList.ts b/src/store/modules/routesList.ts new file mode 100644 index 00000000..a6e3e72f --- /dev/null +++ b/src/store/modules/routesList.ts @@ -0,0 +1,22 @@ +import { Module } from 'vuex'; + +const routesListModule: Module = { + namespaced: true, + state: { + routesList: [], + }, + mutations: { + // 设置路由,菜单中使用到 + getRoutesList(state: any, data: Array) { + state.routesList = data; + }, + }, + actions: { + // 设置路由,菜单中使用到 + async setRoutesList({ commit }, data: any) { + commit('getRoutesList', data); + }, + }, +}; + +export default routesListModule; diff --git a/src/store/modules/tagsViewRoutes.ts b/src/store/modules/tagsViewRoutes.ts new file mode 100644 index 00000000..8214c814 --- /dev/null +++ b/src/store/modules/tagsViewRoutes.ts @@ -0,0 +1,22 @@ +import { Module } from 'vuex'; + +const tagsViewRoutesModule: Module = { + namespaced: true, + state: { + tagsViewRoutes: [], + }, + mutations: { + // 设置 TagsView 路由 + getTagsViewRoutes(state: any, data: Array) { + state.tagsViewRoutes = data; + }, + }, + actions: { + // 设置 TagsView 路由 + async setTagsViewRoutes({ commit }, data: Array) { + commit('getTagsViewRoutes', data); + }, + }, +}; + +export default tagsViewRoutesModule; diff --git a/src/store/modules/themeConfig.ts b/src/store/modules/themeConfig.ts new file mode 100644 index 00000000..d2f5dfd5 --- /dev/null +++ b/src/store/modules/themeConfig.ts @@ -0,0 +1,132 @@ +import { Module } from 'vuex'; + +const themeConfigModule: Module = { + namespaced: true, + state: { + themeConfig: { + // 是否开启布局配置抽屉 + isDrawer: false, + + /* 全局主题 + ------------------------------- */ + // 默认 primary 颜色,请注意:需要同时修改 `/@/theme/common/var.scss` 对应的值 + primary: '#409eff', + // 默认 success 颜色,请注意:需要同时修改 `/@/theme/common/var.scss` 对应的值 + success: '#67c23a', + // 默认 info 颜色,请注意:需要同时修改 `/@/theme/common/var.scss` 对应的值 + info: '#909399', + // 默认 warning 颜色,请注意:需要同时修改 `/@/theme/common/var.scss` 对应的值 + warning: '#e6a23c', + // 默认 danger 颜色,请注意:需要同时修改 `/@/theme/common/var.scss` 对应的值 + danger: '#f56c6c', + + /* 菜单 / 顶栏 + ------------------------------- */ + // 默认顶栏导航背景颜色,请注意:需要同时修改 `/@/theme/common/var.scss` 对应的值 + topBar: '#ffffff', + // 默认菜单导航背景颜色,请注意:需要同时修改 `/@/theme/common/var.scss` 对应的值 + menuBar: '#545c64', + // 默认分栏菜单背景颜色,请注意:需要同时修改 `/@/theme/common/var.scss` 对应的值 + columnsMenuBar: '#545c64', + // 默认顶栏导航字体颜色,请注意:需要同时修改 `/@/theme/common/var.scss` 对应的值 + topBarColor: '#606266', + // 默认菜单导航字体颜色,请注意:需要同时修改 `/@/theme/common/var.scss` 对应的值 + menuBarColor: '#eaeaea', + // 默认分栏菜单字体颜色,请注意:需要同时修改 `/@/theme/common/var.scss` 对应的值 + columnsMenuBarColor: '#e6e6e6', + // 是否开启顶栏背景颜色渐变 + isTopBarColorGradual: false, + // 是否开启菜单背景颜色渐变 + isMenuBarColorGradual: false, + // 是否开启菜单字体背景高亮 + isMenuBarColorHighlight: false, + // 是否开启菜单字体背景高亮 + + /* 界面设置 + ------------------------------- */ + // 是否开启菜单水平折叠效果 + isCollapse: false, + // 是否开启菜单手风琴效果 + isUniqueOpened: false, + // 是否开启固定 Header + isFixedHeader: false, + // 初始化变量,用于更新菜单 el-scrollbar 的高度,请勿删除 + isFixedHeaderChange: false, + // 是否开启经典布局分割菜单(仅经典布局生效) + isClassicSplitMenu: false, + // 是否开启自动锁屏 + isLockScreen: false, + // 开启自动锁屏倒计时(s/秒) + lockScreenTime: 30, + + /* 界面显示 + ------------------------------- */ + // 是否开启侧边栏 Logo + isShowLogo: false, + // 初始化变量,用于 el-scrollbar 的高度更新,请勿删除 + isShowLogoChange: false, + // 是否开启 Breadcrumb + isBreadcrumb: true, + // 是否开启 Tagsview + isTagsview: true, + // 是否开启 Breadcrumb 图标 + isBreadcrumbIcon: false, + // 是否开启 Tagsview 图标 + isTagsviewIcon: false, + // 是否开启 TagsView 缓存 + isCacheTagsView: false, + // 是否开启 TagsView 拖拽 + isSortableTagsView: true, + // 是否开启 Footer 底部版权信息 + isFooter: false, + // 是否开启灰色模式 + isGrayscale: false, + // 是否开启色弱模式 + isInvert: false, + // 是否开启水印 + isWartermark: false, + // 水印文案 + wartermarkText: 'small@小柒', + + /* 其它设置 + ------------------------------- */ + // 默认 Tagsview 风格,可选 1、 tags-style-one 2、 tags-style-two 3、 tags-style-three 4、 tags-style-four + tagsStyle: 'tags-style-one', + // 默认主页面切换动画,可选 1、 slide-right 2、 slide-left 3、 opacitys + animation: 'slide-right', + // 默认分栏高亮风格,可选 1、 圆角 columns-round 2、 卡片 columns-card + columnsAsideStyle: 'columns-round', + + /* 布局切换 + ------------------------------- */ + // 默认布局,可选 1、默认 defaults 2、经典 classic 3、横向 transverse 4、分栏 columns + layout: 'defaults', + + /* 后端控制路由 + ------------------------------- */ + // 是否开启后端控制路由 + isRequestRoutes: false, + + /* 全局网站标题 / 副标题 + ------------------------------- */ + // 网站主标题(菜单导航、浏览器当前网页标题) + globalTitle: 'vue-next-admin', + // 网站副标题(登录页顶部文字) + globalViceTitle: 'SMALL@小柒', + }, + }, + mutations: { + // 设置布局配置 + getThemeConfig(state: any, data: object) { + state.themeConfig = data; + }, + }, + actions: { + // 设置布局配置 + setThemeConfig({ commit }, data: object) { + commit('getThemeConfig', data); + }, + }, +}; + +export default themeConfigModule; diff --git a/src/store/modules/userInfos.ts b/src/store/modules/userInfos.ts new file mode 100644 index 00000000..64f723a7 --- /dev/null +++ b/src/store/modules/userInfos.ts @@ -0,0 +1,27 @@ +import { Module } from 'vuex'; +import { getSession } from '/@/utils/storage.ts'; + +const userInfosModule: Module = { + namespaced: true, + state: { + userInfos: {}, + }, + mutations: { + // 设置用户信息 + getUserInfos(state: any, data: object) { + state.userInfos = data; + }, + }, + actions: { + // 设置用户信息 + async setUserInfos({ commit }, data: object) { + if (data) { + commit('getUserInfos', data); + } else { + if (getSession('userInfo')) commit('getUserInfos', getSession('userInfo')); + } + }, + }, +}; + +export default userInfosModule; diff --git a/src/theme/app.scss b/src/theme/app.scss index 5f6d38de..4f7ab039 100644 --- a/src/theme/app.scss +++ b/src/theme/app.scss @@ -14,8 +14,7 @@ body, padding: 0; width: 100%; height: 100%; - font-family: Helvetica Neue, Helvetica, PingFang SC, Hiragino Sans GB, - Microsoft YaHei, SimSun, sans-serif; + font-family: Helvetica Neue, Helvetica, PingFang SC, Hiragino Sans GB, Microsoft YaHei, SimSun, sans-serif; font-weight: 400; -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; diff --git a/src/theme/common/transition.scss b/src/theme/common/transition.scss index ca97f906..8d498e3b 100644 --- a/src/theme/common/transition.scss +++ b/src/theme/common/transition.scss @@ -4,82 +4,82 @@ .slide-right-leave-active, .slide-left-enter-active, .slide-left-leave-active { - will-change: transform; - transition: all 0.3s ease; + will-change: transform; + transition: all 0.3s ease; } // slide-right .slide-right-enter-from { - opacity: 0; - transform: translateX(-20px); + opacity: 0; + transform: translateX(-20px); } .slide-right-leave-to { - opacity: 0; - transform: translateX(20px); + opacity: 0; + transform: translateX(20px); } // slide-left .slide-left-enter-from { - @extend .slide-right-leave-to; + @extend .slide-right-leave-to; } .slide-left-leave-to { - @extend .slide-right-enter-from; + @extend .slide-right-enter-from; } // opacitys .opacitys-enter-active, .opacitys-leave-active { - will-change: transform; - transition: all 0.3s ease; + will-change: transform; + transition: all 0.3s ease; } .opacitys-enter-from, .opacitys-leave-to { - opacity: 0; + opacity: 0; } /* Breadcrumb 面包屑过渡动画 ------------------------------- */ .breadcrumb-enter-active, .breadcrumb-leave-active { - transition: all 0.3s; + transition: all 0.3s; } .breadcrumb-enter-from, .breadcrumb-leave-active { - opacity: 0; - transform: translateX(20px); + opacity: 0; + transform: translateX(20px); } .breadcrumb-leave-active { - position: absolute; + position: absolute; } /* logo 过渡动画 ------------------------------- */ @keyframes logoAnimation { - 0% { - transform: scale(0); - } - 80% { - transform: scale(1.2); - } - 100% { - transform: scale(1); - } + 0% { + transform: scale(0); + } + 80% { + transform: scale(1.2); + } + 100% { + transform: scale(1); + } } /* 404、401 过渡动画 ------------------------------- */ @keyframes error-num { - 0% { - transform: translateY(60px); - opacity: 0; - } - 100% { - transform: translateY(0); - opacity: 1; - } + 0% { + transform: translateY(60px); + opacity: 0; + } + 100% { + transform: translateY(0); + opacity: 1; + } } @keyframes error-img { - 0% { - opacity: 0; - } - 100% { - opacity: 1; - } + 0% { + opacity: 0; + } + 100% { + opacity: 1; + } } diff --git a/src/theme/common/var.scss b/src/theme/common/var.scss index 252aa799..549e061e 100644 --- a/src/theme/common/var.scss +++ b/src/theme/common/var.scss @@ -68,62 +68,62 @@ $--bg-columnsMenuBarColor: #e6e6e6; /* 赋值给:root ------------------------------- */ :root { - --color-primary: #{$--color-primary}; - --color-whites: #{$--color-whites}; - --color-blacks: #{$--color-blacks}; - --color-primary-light-1: #{$--color-primary-light-1}; - --color-primary-light-2: #{$--color-primary-light-2}; - --color-primary-light-3: #{$--color-primary-light-3}; - --color-primary-light-4: #{$--color-primary-light-4}; - --color-primary-light-5: #{$--color-primary-light-5}; - --color-primary-light-6: #{$--color-primary-light-6}; - --color-primary-light-7: #{$--color-primary-light-7}; - --color-primary-light-8: #{$--color-primary-light-8}; - --color-primary-light-9: #{$--color-primary-light-9}; - --color-success: #{$--color-success}; - --color-success-light-1: #{$--color-success-light-1}; - --color-success-light-2: #{$--color-success-light-2}; - --color-success-light-3: #{$--color-success-light-3}; - --color-success-light-4: #{$--color-success-light-4}; - --color-success-light-5: #{$--color-success-light-5}; - --color-success-light-6: #{$--color-success-light-6}; - --color-success-light-7: #{$--color-success-light-7}; - --color-success-light-8: #{$--color-success-light-8}; - --color-success-light-9: #{$--color-success-light-9}; - --color-info: #{$--color-info}; - --color-info-light-1: #{$--color-info-light-1}; - --color-info-light-2: #{$--color-info-light-2}; - --color-info-light-3: #{$--color-info-light-3}; - --color-info-light-4: #{$--color-info-light-4}; - --color-info-light-5: #{$--color-info-light-5}; - --color-info-light-6: #{$--color-info-light-6}; - --color-info-light-7: #{$--color-info-light-7}; - --color-info-light-8: #{$--color-info-light-8}; - --color-info-light-9: #{$--color-info-light-9}; - --color-warning: #{$--color-warning}; - --color-warning-light-1: #{$--color-warning-light-1}; - --color-warning-light-2: #{$--color-warning-light-2}; - --color-warning-light-3: #{$--color-warning-light-3}; - --color-warning-light-4: #{$--color-warning-light-4}; - --color-warning-light-5: #{$--color-warning-light-5}; - --color-warning-light-6: #{$--color-warning-light-6}; - --color-warning-light-7: #{$--color-warning-light-7}; - --color-warning-light-8: #{$--color-warning-light-8}; - --color-warning-light-9: #{$--color-warning-light-9}; - --color-danger: #{$--color-danger}; - --color-danger-light-1: #{$--color-danger-light-1}; - --color-danger-light-2: #{$--color-danger-light-2}; - --color-danger-light-3: #{$--color-danger-light-3}; - --color-danger-light-4: #{$--color-danger-light-4}; - --color-danger-light-5: #{$--color-danger-light-5}; - --color-danger-light-6: #{$--color-danger-light-6}; - --color-danger-light-7: #{$--color-danger-light-7}; - --color-danger-light-8: #{$--color-danger-light-8}; - --color-danger-light-9: #{$--color-danger-light-9}; - --bg-topBar: #{$--bg-topBar}; - --bg-menuBar: #{$--bg-menuBar}; - --bg-columnsMenuBar: #{$--bg-columnsMenuBar}; - --bg-topBarColor: #{$--bg-topBarColor}; - --bg-menuBarColor: #{$--bg-menuBarColor}; - --bg-columnsMenuBarColor: #{$--bg-columnsMenuBarColor}; + --color-primary: #{$--color-primary}; + --color-whites: #{$--color-whites}; + --color-blacks: #{$--color-blacks}; + --color-primary-light-1: #{$--color-primary-light-1}; + --color-primary-light-2: #{$--color-primary-light-2}; + --color-primary-light-3: #{$--color-primary-light-3}; + --color-primary-light-4: #{$--color-primary-light-4}; + --color-primary-light-5: #{$--color-primary-light-5}; + --color-primary-light-6: #{$--color-primary-light-6}; + --color-primary-light-7: #{$--color-primary-light-7}; + --color-primary-light-8: #{$--color-primary-light-8}; + --color-primary-light-9: #{$--color-primary-light-9}; + --color-success: #{$--color-success}; + --color-success-light-1: #{$--color-success-light-1}; + --color-success-light-2: #{$--color-success-light-2}; + --color-success-light-3: #{$--color-success-light-3}; + --color-success-light-4: #{$--color-success-light-4}; + --color-success-light-5: #{$--color-success-light-5}; + --color-success-light-6: #{$--color-success-light-6}; + --color-success-light-7: #{$--color-success-light-7}; + --color-success-light-8: #{$--color-success-light-8}; + --color-success-light-9: #{$--color-success-light-9}; + --color-info: #{$--color-info}; + --color-info-light-1: #{$--color-info-light-1}; + --color-info-light-2: #{$--color-info-light-2}; + --color-info-light-3: #{$--color-info-light-3}; + --color-info-light-4: #{$--color-info-light-4}; + --color-info-light-5: #{$--color-info-light-5}; + --color-info-light-6: #{$--color-info-light-6}; + --color-info-light-7: #{$--color-info-light-7}; + --color-info-light-8: #{$--color-info-light-8}; + --color-info-light-9: #{$--color-info-light-9}; + --color-warning: #{$--color-warning}; + --color-warning-light-1: #{$--color-warning-light-1}; + --color-warning-light-2: #{$--color-warning-light-2}; + --color-warning-light-3: #{$--color-warning-light-3}; + --color-warning-light-4: #{$--color-warning-light-4}; + --color-warning-light-5: #{$--color-warning-light-5}; + --color-warning-light-6: #{$--color-warning-light-6}; + --color-warning-light-7: #{$--color-warning-light-7}; + --color-warning-light-8: #{$--color-warning-light-8}; + --color-warning-light-9: #{$--color-warning-light-9}; + --color-danger: #{$--color-danger}; + --color-danger-light-1: #{$--color-danger-light-1}; + --color-danger-light-2: #{$--color-danger-light-2}; + --color-danger-light-3: #{$--color-danger-light-3}; + --color-danger-light-4: #{$--color-danger-light-4}; + --color-danger-light-5: #{$--color-danger-light-5}; + --color-danger-light-6: #{$--color-danger-light-6}; + --color-danger-light-7: #{$--color-danger-light-7}; + --color-danger-light-8: #{$--color-danger-light-8}; + --color-danger-light-9: #{$--color-danger-light-9}; + --bg-topBar: #{$--bg-topBar}; + --bg-menuBar: #{$--bg-menuBar}; + --bg-columnsMenuBar: #{$--bg-columnsMenuBar}; + --bg-topBarColor: #{$--bg-topBarColor}; + --bg-menuBarColor: #{$--bg-menuBarColor}; + --bg-columnsMenuBarColor: #{$--bg-columnsMenuBarColor}; } diff --git a/src/theme/element.scss b/src/theme/element.scss index 787d3dae..2f1feba8 100644 --- a/src/theme/element.scss +++ b/src/theme/element.scss @@ -5,260 +5,256 @@ ------------------------------- */ // text .el-button--text { - color: set-color(primary); - &:focus, - &:hover { - color: set-color(primary-light-3); - } + color: set-color(primary); + &:focus, + &:hover { + color: set-color(primary-light-3); + } } .el-button--text:active { - color: set-color(primary-light-3); + color: set-color(primary-light-3); } // default .el-button--default:hover, .el-button--default:focus { - @include Button(primary, primary-light-8, primary-light-6); + @include Button(primary, primary-light-8, primary-light-6); } .el-button--default.is-plain:hover, .el-button--default.is-plain:focus { - @include Button(primary, whites, primary-light-1); + @include Button(primary, whites, primary-light-1); } .el-button--default:active { - @include Button(primary, whites, primary-light-1); + @include Button(primary, whites, primary-light-1); } // primary .el-button--primary { - @include Button(whites, primary, primary); - &:hover, - &:focus { - @include Button(whites, primary-light-3, primary-light-3); - } + @include Button(whites, primary, primary); + &:hover, + &:focus { + @include Button(whites, primary-light-3, primary-light-3); + } } .el-button--primary.is-plain { - @include Button(primary, primary-light-8, primary-light-6); - &:hover, - &:focus { - @include Button(whites, primary, primary); - } + @include Button(primary, primary-light-8, primary-light-6); + &:hover, + &:focus { + @include Button(whites, primary, primary); + } } .el-button--primary.is-disabled, .el-button--primary.is-disabled:active, .el-button--primary.is-disabled:focus, .el-button--primary.is-disabled:hover { - @include Button(whites, primary-light-7, primary-light-7); + @include Button(whites, primary-light-7, primary-light-7); } .el-button--primary.is-active, .el-button--primary:active { - @include Button(whites, primary, primary); + @include Button(whites, primary, primary); } // success .el-button--success { - @include Button(whites, success, success); - &:hover, - &:focus { - @include Button(whites, success-light-3, success-light-3); - } + @include Button(whites, success, success); + &:hover, + &:focus { + @include Button(whites, success-light-3, success-light-3); + } } .el-button--success.is-plain { - @include Button(success, success-light-8, success-light-6); - &:hover, - &:focus { - @include Button(whites, success, success); - } + @include Button(success, success-light-8, success-light-6); + &:hover, + &:focus { + @include Button(whites, success, success); + } } .el-button--success.is-active, .el-button--success:active { - @include Button(whites, success, success); + @include Button(whites, success, success); } // info .el-button--info { - @include Button(whites, info, info); - &:hover, - &:focus { - @include Button(whites, info-light-3, info-light-3); - } + @include Button(whites, info, info); + &:hover, + &:focus { + @include Button(whites, info-light-3, info-light-3); + } } .el-button--info.is-plain { - @include Button(info, info-light-8, info-light-6); - &:hover, - &:focus { - @include Button(whites, info, info); - } + @include Button(info, info-light-8, info-light-6); + &:hover, + &:focus { + @include Button(whites, info, info); + } } .el-button--info.is-active, .el-button--info:active { - @include Button(whites, info, info); + @include Button(whites, info, info); } // warning .el-button--warning { - @include Button(whites, warning, warning); - &:hover, - &:focus { - @include Button(whites, warning-light-3, warning-light-3); - } + @include Button(whites, warning, warning); + &:hover, + &:focus { + @include Button(whites, warning-light-3, warning-light-3); + } } .el-button--warning.is-plain { - @include Button(warning, warning-light-8, warning-light-6); - &:hover, - &:focus { - @include Button(whites, warning, warning); - } + @include Button(warning, warning-light-8, warning-light-6); + &:hover, + &:focus { + @include Button(whites, warning, warning); + } } .el-button--warning.is-active, .el-button--warning:active { - @include Button(whites, warning, warning); + @include Button(whites, warning, warning); } // danger .el-button--danger { - @include Button(whites, danger, danger); - &:hover, - &:focus { - @include Button(whites, danger-light-3, danger-light-3); - } + @include Button(whites, danger, danger); + &:hover, + &:focus { + @include Button(whites, danger-light-3, danger-light-3); + } } .el-button--danger.is-plain { - @include Button(danger, danger-light-8, danger-light-6); - &:hover, - &:focus { - @include Button(whites, danger, danger); - } + @include Button(danger, danger-light-8, danger-light-6); + &:hover, + &:focus { + @include Button(whites, danger, danger); + } } .el-button--danger.is-active, .el-button--danger:active { - @include Button(whites, danger, danger); + @include Button(whites, danger, danger); } /* Link 文字链接 ------------------------------- */ // default .el-link.el-link--default:hover { - color: set-color(primary-light-3); + color: set-color(primary-light-3); } // primary .el-link.el-link--primary { - color: set-color(primary); - &:hover { - color: set-color(primary-light-3); - } + color: set-color(primary); + &:hover { + color: set-color(primary-light-3); + } } .el-link.el-link--default::after, .el-link.is-underline:hover::after, .el-link.el-link--primary.is-underline:hover::after, .el-link.el-link--primary::after { - border-color: set-color(primary); + border-color: set-color(primary); } // success .el-link.el-link--success { - color: set-color(success); - &:hover { - color: set-color(success-light-3); - } + color: set-color(success); + &:hover { + color: set-color(success-light-3); + } } .el-link.el-link--success.is-underline:hover::after, .el-link.el-link--success::after { - border-color: set-color(success); + border-color: set-color(success); } // info .el-link.el-link--info { - color: set-color(info); - &:hover { - color: set-color(info-light-3); - } + color: set-color(info); + &:hover { + color: set-color(info-light-3); + } } .el-link.el-link--info.is-underline:hover::after, .el-link.el-link--info::after { - border-color: set-color(info); + border-color: set-color(info); } // warning .el-link.el-link--warning { - color: set-color(warning); - &:hover { - color: set-color(warning-light-3); - } + color: set-color(warning); + &:hover { + color: set-color(warning-light-3); + } } .el-link.el-link--warning.is-underline:hover::after, .el-link.el-link--warning::after { - border-color: set-color(warning); + border-color: set-color(warning); } // danger .el-link.el-link--danger { - color: set-color(danger); - &:hover { - color: set-color(danger-light-3); - } + color: set-color(danger); + &:hover { + color: set-color(danger-light-3); + } } .el-link.el-link--danger.is-underline:hover::after, .el-link.el-link--danger::after { - border-color: set-color(danger); + border-color: set-color(danger); } /* Radio 单选框 ------------------------------- */ .el-radio__input.is-checked + .el-radio__label, .el-radio-button__inner:hover { - color: set-color(primary); + color: set-color(primary); } .el-radio__input.is-checked .el-radio__inner { - @include RadioCheckbox(primary); + @include RadioCheckbox(primary); } .el-radio-button__orig-radio:checked + .el-radio-button__inner { - color: set-color(whites); - @include RadioCheckbox(primary); - box-shadow: -1px 0 0 0 set-color(primary); + color: set-color(whites); + @include RadioCheckbox(primary); + box-shadow: -1px 0 0 0 set-color(primary); } .el-radio.is-bordered.is-checked, .el-radio__inner:hover { - border-color: set-color(primary); + border-color: set-color(primary); } /* Checkbox 多选框 ------------------------------- */ .el-checkbox__input.is-checked + .el-checkbox__label, .el-checkbox-button__inner:hover { - color: set-color(primary); + color: set-color(primary); } .el-checkbox__input.is-checked .el-checkbox__inner { - @include RadioCheckbox(primary); + @include RadioCheckbox(primary); } .el-checkbox__input.is-focus .el-checkbox__inner, .el-checkbox__inner:hover, .el-checkbox.is-bordered.is-checked, .el-checkbox-button.is-focus .el-checkbox-button__inner { - border-color: set-color(primary); + border-color: set-color(primary); } .el-checkbox-button.is-checked .el-checkbox-button__inner { - color: set-color(whites); - @include RadioCheckbox(primary); - box-shadow: -1px 0 0 0 set-color(primary); + color: set-color(whites); + @include RadioCheckbox(primary); + box-shadow: -1px 0 0 0 set-color(primary); } .el-checkbox-button.is-checked:first-child .el-checkbox-button__inner { - border-left-color: set-color(primary); + border-left-color: set-color(primary); } .el-checkbox__input.is-checked .el-checkbox__inner, .el-checkbox__input.is-indeterminate .el-checkbox__inner { - background-color: set-color(primary); - border-color: set-color(primary); + background-color: set-color(primary); + border-color: set-color(primary); } /* Input 输入框、InputNumber 计数器 ------------------------------- */ .el-input__inner:focus, -.el-input-number__decrease:hover:not(.is-disabled) - ~ .el-input - .el-input__inner:not(.is-disabled), -.el-input-number__increase:hover:not(.is-disabled) - ~ .el-input - .el-input__inner:not(.is-disabled), +.el-input-number__decrease:hover:not(.is-disabled) ~ .el-input .el-input__inner:not(.is-disabled), +.el-input-number__increase:hover:not(.is-disabled) ~ .el-input .el-input__inner:not(.is-disabled), .el-textarea__inner:focus { - border-color: set-color(primary); + border-color: set-color(primary); } .el-input-number__increase:hover, .el-input-number__decrease:hover { - color: set-color(primary); + color: set-color(primary); } // 菜单搜索 .el-autocomplete-suggestion__wrap { - max-height: 280px !important; + max-height: 280px !important; } /* Select 选择器 @@ -267,48 +263,48 @@ .el-range-editor.is-active:hover, .el-select .el-input.is-focus .el-input__inner, .el-select .el-input__inner:focus { - border-color: set-color(primary); + border-color: set-color(primary); } .el-select-dropdown__item.selected { - color: set-color(primary); + color: set-color(primary); } /* Cascader 级联选择器 ------------------------------- */ .el-cascader .el-input .el-input__inner:focus, .el-cascader .el-input.is-focus .el-input__inner { - border-color: set-color(primary); + border-color: set-color(primary); } .el-cascader-node.in-active-path, .el-cascader-node.is-active, .el-cascader-node.is-selectable.in-checked-path { - color: set-color(primary); + color: set-color(primary); } /* Switch 开关 ------------------------------- */ .el-switch.is-checked .el-switch__core { - border-color: set-color(primary); - background-color: set-color(primary); + border-color: set-color(primary); + background-color: set-color(primary); } .el-switch__label.is-active { - color: set-color(primary); + color: set-color(primary); } /* Slider 滑块 ------------------------------- */ .el-slider__bar { - background-color: set-color(primary); + background-color: set-color(primary); } .el-slider__button { - border-color: set-color(primary); + border-color: set-color(primary); } /* TimePicker 时间选择器 ------------------------------- */ .el-time-panel__btn.confirm, .el-time-spinner__arrow:hover { - color: set-color(primary); + color: set-color(primary); } /* DatePicker 日期选择器 @@ -325,23 +321,23 @@ .el-month-table td.today .cell, .el-month-table td.current:not(.disabled) .cell, .el-picker-panel__shortcut:hover { - color: set-color(primary); + color: set-color(primary); } .el-date-table td.current:not(.disabled) span, .el-date-table td.selected span { - color: set-color(whites); - background-color: set-color(primary); + color: set-color(whites); + background-color: set-color(primary); } .el-date-table td.end-date span, .el-date-table td.start-date span { - background-color: set-color(primary); + background-color: set-color(primary); } .el-date-table td.in-range div, .el-date-table td.in-range div:hover, .el-date-table.is-week-mode .el-date-table__row.current div, .el-date-table.is-week-mode .el-date-table__row:hover div, .el-date-table td.selected div { - background-color: set-color(primary-light-9); + background-color: set-color(primary-light-9); } /* Upload 上传 @@ -350,181 +346,181 @@ .el-upload-list__item.is-success .el-upload-list__item-name:hover, .el-upload-list__item .el-icon-close-tip, .el-upload-dragger .el-upload__text em { - color: set-color(primary); + color: set-color(primary); } .el-upload--picture-card:hover, .el-upload:focus { - color: set-color(primary); - border-color: set-color(primary); + color: set-color(primary); + border-color: set-color(primary); } .el-upload-dragger:hover, .el-upload:focus .el-upload-dragger { - border-color: set-color(primary); + border-color: set-color(primary); } /* Transfer 穿梭框 ------------------------------- */ .el-transfer-panel__item:hover { - color: set-color(primary); + color: set-color(primary); } /* Form 表单 ------------------------------- */ .el-form { - .el-form-item:last-of-type { - margin-bottom: 0 !important; - } + .el-form-item:last-of-type { + margin-bottom: 0 !important; + } } /* Table 表格 ------------------------------- */ .el-table .descending .sort-caret.descending { - border-top-color: set-color(primary); + border-top-color: set-color(primary); } .el-table .ascending .sort-caret.ascending { - border-bottom-color: set-color(primary); + border-bottom-color: set-color(primary); } /* Tag 标签 ------------------------------- */ // primary .el-tag { - @include Tag(primary, primary-light-8, primary-light-6); + @include Tag(primary, primary-light-8, primary-light-6); } .el-tag .el-tag__close { - color: set-color(primary); - &:hover { - @include TagDark(whites, primary); - } + color: set-color(primary); + &:hover { + @include TagDark(whites, primary); + } } .el-tag--dark { - @include TagDark(whites, primary); + @include TagDark(whites, primary); } .el-tag--dark .el-tag__close { - color: set-color(whites); - &:hover { - background-color: set-color(primary-light-3); - } + color: set-color(whites); + &:hover { + background-color: set-color(primary-light-3); + } } .el-tag--plain { - @include Tag(primary, whites, primary-light-3); + @include Tag(primary, whites, primary-light-3); } // success .el-tag.el-tag--success { - @include Tag(success, success-light-8, success-light-6); + @include Tag(success, success-light-8, success-light-6); } .el-tag.el-tag--success .el-tag__close { - color: set-color(success); - &:hover { - @include TagDark(whites, success); - } + color: set-color(success); + &:hover { + @include TagDark(whites, success); + } } .el-tag--dark.el-tag--success { - @include TagDark(whites, success); + @include TagDark(whites, success); } .el-tag--dark.el-tag--success .el-tag__close { - color: set-color(whites); - &:hover { - background-color: set-color(success-light-3); - } + color: set-color(whites); + &:hover { + background-color: set-color(success-light-3); + } } .el-tag--plain.el-tag--success { - @include Tag(success, whites, success-light-3); + @include Tag(success, whites, success-light-3); } // info .el-tag.el-tag--info { - @include Tag(info, info-light-8, info-light-6); + @include Tag(info, info-light-8, info-light-6); } .el-tag.el-tag--info .el-tag__close { - color: set-color(info); - &:hover { - @include TagDark(whites, info); - } + color: set-color(info); + &:hover { + @include TagDark(whites, info); + } } .el-tag--dark.el-tag--info { - @include TagDark(whites, info); + @include TagDark(whites, info); } .el-tag--dark.el-tag--info .el-tag__close { - color: set-color(whites); - &:hover { - background-color: set-color(info-light-3); - } + color: set-color(whites); + &:hover { + background-color: set-color(info-light-3); + } } .el-tag--plain.el-tag--info { - @include Tag(info, whites, info-light-3); + @include Tag(info, whites, info-light-3); } // warning .el-tag.el-tag--warning { - @include Tag(warning, warning-light-8, warning-light-6); + @include Tag(warning, warning-light-8, warning-light-6); } .el-tag.el-tag--warning .el-tag__close { - color: set-color(warning); - &:hover { - @include TagDark(whites, warning); - } + color: set-color(warning); + &:hover { + @include TagDark(whites, warning); + } } .el-tag--dark.el-tag--warning { - @include TagDark(whites, warning); + @include TagDark(whites, warning); } .el-tag--dark.el-tag--warning .el-tag__close { - color: set-color(whites); - &:hover { - background-color: set-color(warning-light-3); - } + color: set-color(whites); + &:hover { + background-color: set-color(warning-light-3); + } } .el-tag--plain.el-tag--warning { - @include Tag(warning, whites, warning-light-3); + @include Tag(warning, whites, warning-light-3); } // danger .el-tag.el-tag--danger { - @include Tag(danger, danger-light-8, danger-light-6); + @include Tag(danger, danger-light-8, danger-light-6); } .el-tag.el-tag--danger .el-tag__close { - color: set-color(danger); - &:hover { - @include TagDark(whites, danger); - } + color: set-color(danger); + &:hover { + @include TagDark(whites, danger); + } } .el-tag--dark.el-tag--danger { - @include TagDark(whites, danger); + @include TagDark(whites, danger); } .el-tag--dark.el-tag--danger .el-tag__close { - color: set-color(whites); - &:hover { - background-color: set-color(danger-light-3); - } + color: set-color(whites); + &:hover { + background-color: set-color(danger-light-3); + } } .el-tag--plain.el-tag--danger { - @include Tag(danger, whites, danger-light-3); + @include Tag(danger, whites, danger-light-3); } /* Progress 进度条 ------------------------------- */ // primary .el-progress-bar__inner { - background-color: set-color(primary) !important; + background-color: set-color(primary) !important; } // success .el-progress.is-success .el-progress-bar__inner { - background-color: set-color(success) !important; + background-color: set-color(success) !important; } .el-progress.is-success .el-progress__text { - color: set-color(success) !important; + color: set-color(success) !important; } // warning .el-progress.is-warning .el-progress-bar__inner { - background-color: set-color(warning) !important; + background-color: set-color(warning) !important; } .el-progress.is-warning .el-progress__text { - color: set-color(warning) !important; + color: set-color(warning) !important; } // danger .el-badge__content, .el-progress.is-exception .el-progress-bar__inner { - background-color: set-color(danger) !important; + background-color: set-color(danger) !important; } .el-progress.is-exception .el-progress__text { - color: set-color(danger) !important; + color: set-color(danger) !important; } /* Pagination 分页 @@ -533,194 +529,194 @@ .el-pager li:hover, .el-pagination button:hover, .el-pagination.is-background .el-pager li:not(.disabled):hover { - color: set-color(primary); + color: set-color(primary); } .el-pagination__sizes .el-input .el-input__inner:hover { - border-color: set-color(primary); + border-color: set-color(primary); } .el-pagination.is-background .el-pager li:not(.disabled).active { - background-color: set-color(primary); - color: set-color(whites); + background-color: set-color(primary); + color: set-color(whites); } /* Badge 标记 ------------------------------- */ // primary .el-badge__content--primary { - background-color: set-color(primary); + background-color: set-color(primary); } // success .el-badge__content--success { - background-color: set-color(success); + background-color: set-color(success); } // warning .el-badge__content--warning { - background-color: set-color(warning); + background-color: set-color(warning); } // danger .el-badge__content--danger { - background-color: set-color(danger); + background-color: set-color(danger); } // info .el-badge__content--info { - background-color: set-color(info); + background-color: set-color(info); } /* Alert 警告 ------------------------------- */ // success .el-alert--success.is-light { - @include Alert(success, success-light-9, success-light-7); + @include Alert(success, success-light-9, success-light-7); } .el-alert--success.is-dark { - @include Alert(whites, success, success-light-7); + @include Alert(whites, success, success-light-7); } .el-alert--success.is-light .el-alert__description { - color: set-color(success); + color: set-color(success); } // warning .el-alert--warning.is-light { - @include Alert(warning, warning-light-9, warning-light-7); + @include Alert(warning, warning-light-9, warning-light-7); } .el-alert--warning.is-dark { - @include Alert(whites, warning, warning-light-7); + @include Alert(whites, warning, warning-light-7); } .el-alert--warning.is-light .el-alert__description { - color: set-color(warning); + color: set-color(warning); } // info .el-alert--info.is-light { - @include Alert(info, info-light-9, info-light-7); + @include Alert(info, info-light-9, info-light-7); } .el-alert--info.is-dark { - @include Alert(whites, info, info-light-7); + @include Alert(whites, info, info-light-7); } .el-alert--info.is-light .el-alert__description { - color: set-color(info); + color: set-color(info); } // error .el-alert--error.is-light { - @include Alert(danger, danger-light-9, danger-light-7); + @include Alert(danger, danger-light-9, danger-light-7); } .el-alert--error.is-dark { - @include Alert(whites, danger, danger-light-7); + @include Alert(whites, danger, danger-light-7); } .el-alert--error.is-light .el-alert__description { - color: set-color(danger); + color: set-color(danger); } /* Loading 加载 ------------------------------- */ .el-loading-spinner .path { - stroke: set-color(primary); + stroke: set-color(primary); } .el-loading-spinner .el-loading-text, .el-loading-spinner i { - color: set-color(primary); + color: set-color(primary); } /* Message 消息提示 ------------------------------- */ // default/info .el-message { - background-color: set-color(info-light-9); - border-color: set-color(info-light-8); - min-width: unset !important; - padding: 15px !important; + background-color: set-color(info-light-9); + border-color: set-color(info-light-8); + min-width: unset !important; + padding: 15px !important; } .el-message .el-message__content, .el-message .el-icon-info { - color: set-color(info); + color: set-color(info); } // success .el-message--success { - background-color: set-color(success-light-9); - border-color: set-color(success-light-8); + background-color: set-color(success-light-9); + border-color: set-color(success-light-8); } .el-message--success .el-message__content, .el-message .el-icon-success { - color: set-color(success); + color: set-color(success); } // warning .el-message--warning { - background-color: set-color(warning-light-9); - border-color: set-color(warning-light-8); + background-color: set-color(warning-light-9); + border-color: set-color(warning-light-8); } .el-message--warning .el-message__content, .el-message .el-icon-warning { - color: set-color(warning); + color: set-color(warning); } // error .el-message--error { - background-color: set-color(danger-light-9); - border-color: set-color(danger-light-8); + background-color: set-color(danger-light-9); + border-color: set-color(danger-light-8); } .el-message--error .el-message__content, .el-message .el-icon-error { - color: set-color(danger); + color: set-color(danger); } /* MessageBox 弹框 ------------------------------- */ .el-message-box__headerbtn:focus .el-message-box__close, .el-message-box__headerbtn:hover .el-message-box__close { - color: set-color(primary); + color: set-color(primary); } // success .el-message-box__status.el-icon-success { - color: set-color(success); + color: set-color(success); } // info .el-message-box__status.el-icon-info { - color: set-color(info); + color: set-color(info); } // warning .el-message-box__status.el-icon-warning { - color: set-color(warning); + color: set-color(warning); } // error .el-message-box__status.el-icon-error { - color: set-color(danger); + color: set-color(danger); } /* Notification 通知 ------------------------------- */ // success .el-notification .el-icon-success { - color: set-color(success); + color: set-color(success); } // info .el-notification .el-icon-info { - color: set-color(info); + color: set-color(info); } // warning .el-notification .el-icon-warning { - color: set-color(warning); + color: set-color(warning); } // error .el-notification .el-icon-error { - color: set-color(danger); + color: set-color(danger); } /* NavMenu 导航菜单 ------------------------------- */ // 默认样式修改 .el-menu { - border-right: none !important; + border-right: none !important; } .el-menu-item, .el-submenu__title { - height: 50px !important; - line-height: 50px !important; - color: var(--bg-menuBarColor); - transition: none !important; + height: 50px !important; + line-height: 50px !important; + color: var(--bg-menuBarColor); + transition: none !important; } // horizontal 水平方向时 .el-menu--horizontal > .el-menu-item.is-active, .el-menu--horizontal > .el-submenu.is-active .el-submenu__title { - border-bottom: 3px solid !important; - border-bottom-color: set-color(primary); - color: set-color(primary); + border-bottom: 3px solid !important; + border-bottom-color: set-color(primary); + color: set-color(primary); } .el-menu--horizontal .el-menu-item:not(.is-disabled):focus, .el-menu--horizontal .el-menu-item:not(.is-disabled):hover, @@ -728,84 +724,84 @@ .el-menu--horizontal > .el-submenu:hover .el-submenu__title, .el-menu--horizontal .el-menu .el-menu-item.is-active, .el-menu--horizontal .el-menu .el-submenu.is-active > .el-submenu__title { - color: set-color(primary); + color: set-color(primary); } .el-menu.el-menu--horizontal { - border-bottom: none !important; + border-bottom: none !important; } .el-menu--horizontal > .el-menu-item, .el-menu--horizontal > .el-submenu .el-submenu__title { - color: var(--bg-topBarColor); + color: var(--bg-topBarColor); } // 外部链接时 .el-menu-item a, .el-menu-item a:hover, .el-menu-item i, .el-submenu__title i { - color: inherit; - text-decoration: none; + color: inherit; + text-decoration: none; } .el-menu-item a { - width: 86%; - display: inline-block; + width: 86%; + display: inline-block; } // 默认 hover 时 .el-menu-item:hover, .el-submenu__title:hover { - color: set-color(primary) !important; - background-color: transparent !important; - i { - color: set-color(primary); - } + color: set-color(primary) !important; + background-color: transparent !important; + i { + color: set-color(primary); + } } // 高亮时 .el-menu-item.is-active { - color: set-color(primary); + color: set-color(primary); } .el-active-extend { - color: #ffffff !important; - background-color: set-color(primary) !important; - i { - color: #ffffff !important; - } + color: #ffffff !important; + background-color: set-color(primary) !important; + i { + color: #ffffff !important; + } } .add-is-active { - @extend .el-active-extend; - &:hover { - @extend .el-active-extend; - } + @extend .el-active-extend; + &:hover { + @extend .el-active-extend; + } } // 菜单收起时且是a链接 .el-popper.is-dark a { - color: #ffffff !important; - text-decoration: none; + color: #ffffff !important; + text-decoration: none; } // 菜单收起时鼠标经过背景颜色/字体颜色 .el-popper.is-light { - .el-menu--vertical { - background: var(--bg-menuBar); - } - .el-menu--horizontal { - background: var(--bg-topBar); - .el-menu-item, - .el-submenu__title { - color: var(--bg-topBarColor); - } - } + .el-menu--vertical { + background: var(--bg-menuBar); + } + .el-menu--horizontal { + background: var(--bg-topBar); + .el-menu-item, + .el-submenu__title { + color: var(--bg-topBarColor); + } + } } // 第三方图标字体间距/大小设置 .el-menu-item .iconfont, .el-submenu .iconfont { - font-size: 14px !important; - display: inline-block; - vertical-align: middle; - margin-right: 5px; - width: 24px; - text-align: center; + font-size: 14px !important; + display: inline-block; + vertical-align: middle; + margin-right: 5px; + width: 24px; + text-align: center; } // element plus 本身字体图标 .el-submenu [class^='el-icon-'] { - font-size: 14px !important; + font-size: 14px !important; } /* Tabs 标签页 @@ -813,36 +809,34 @@ .el-tabs__item.is-active, .el-tabs__item:hover, .el-tabs--border-card > .el-tabs__header .el-tabs__item.is-active, -.el-tabs--border-card - > .el-tabs__header - .el-tabs__item:not(.is-disabled):hover { - color: set-color(primary); +.el-tabs--border-card > .el-tabs__header .el-tabs__item:not(.is-disabled):hover { + color: set-color(primary); } .el-tabs__active-bar { - background-color: set-color(primary); + background-color: set-color(primary); } .el-tabs__nav-wrap::after { - height: 1px !important; + height: 1px !important; } /* Breadcrumb 面包屑 ------------------------------- */ .el-breadcrumb__inner a:hover, .el-breadcrumb__inner.is-link:hover { - color: set-color(primary); + color: set-color(primary); } .el-breadcrumb__inner a, .el-breadcrumb__inner.is-link { - color: var(--bg-topBarColor); - font-weight: normal; + color: var(--bg-topBarColor); + font-weight: normal; } /* Dropdown 下拉菜单 ------------------------------- */ .el-dropdown-menu__item:focus, .el-dropdown-menu__item:not(.is-disabled):hover { - color: set-color(primary); - background-color: set-color(primary-light-9); + color: set-color(primary); + background-color: set-color(primary-light-9); } /* Steps 步骤条 @@ -851,112 +845,112 @@ .el-step__title.is-finish, .el-step__description.is-finish, .el-step__head.is-finish { - color: set-color(primary); + color: set-color(primary); } .el-step__head.is-finish { - border-color: set-color(primary); + border-color: set-color(primary); } // success .el-step__title.is-success, .el-step__head.is-success { - color: set-color(success); + color: set-color(success); } .el-step__head.is-success { - border-color: set-color(success); + border-color: set-color(success); } // error .el-step__title.is-error, .el-step__head.is-error { - color: set-color(danger); + color: set-color(danger); } .el-step__head.is-error { - border-color: set-color(danger); + border-color: set-color(danger); } /* Dialog 对话框 ------------------------------- */ .el-dialog__headerbtn:focus .el-dialog__close, .el-dialog__headerbtn:hover .el-dialog__close { - color: set-color(primary); + color: set-color(primary); } .el-overlay { - display: flex; - align-items: center; - justify-content: center; - .el-dialog { - margin: 0 auto !important; - .el-dialog__body { - padding: 20px !important; - } - } + display: flex; + align-items: center; + justify-content: center; + .el-dialog { + margin: 0 auto !important; + .el-dialog__body { + padding: 20px !important; + } + } } /* Card 卡片 ------------------------------- */ .el-card__header { - padding: 15px 20px; + padding: 15px 20px; } /* Timeline 时间线 ------------------------------- */ // primary .el-timeline-item__node--primary { - background-color: set-color(primary); + background-color: set-color(primary); } // success .el-timeline-item__node--success { - background-color: set-color(success); + background-color: set-color(success); } // warning .el-timeline-item__node--warning { - background-color: set-color(warning); + background-color: set-color(warning); } // danger .el-timeline-item__node--danger { - background-color: set-color(danger); + background-color: set-color(danger); } // info .el-timeline-item__node--info { - background-color: set-color(info); + background-color: set-color(info); } /* Calendar 日历 ------------------------------- */ .el-calendar-table td.is-today { - color: set-color(primary); - background-color: set-color(primary-light-9); + color: set-color(primary); + background-color: set-color(primary-light-9); } .el-calendar-table .el-calendar-day:hover, .el-calendar-table td.is-selected { - background-color: set-color(primary-light-9); + background-color: set-color(primary-light-9); } /* Backtop 回到顶部 ------------------------------- */ .el-backtop { - color: set-color(primary); - &:hover { - background-color: set-color(primary-light-9); - } + color: set-color(primary); + &:hover { + background-color: set-color(primary-light-9); + } } /* scrollbar ------------------------------- */ .el-scrollbar__wrap { - overflow-x: hidden !important; - max-height: 100%; /*防止页面切换时,滚动条高度不变的问题(滚动条高度非滚动条滚动高度)*/ + overflow-x: hidden !important; + max-height: 100%; /*防止页面切换时,滚动条高度不变的问题(滚动条高度非滚动条滚动高度)*/ } .el-select-dropdown .el-scrollbar__wrap { - overflow-x: scroll !important; + overflow-x: scroll !important; } .el-select-dropdown__wrap { - max-height: 274px !important; /*修复Select 选择器高度问题*/ + max-height: 274px !important; /*修复Select 选择器高度问题*/ } /* Drawer 抽屉 ------------------------------- */ .el-drawer__body { - width: 100%; - height: 100%; - overflow: auto; + width: 100%; + height: 100%; + overflow: auto; } diff --git a/src/theme/iconSelector.scss b/src/theme/iconSelector.scss index 67877c4e..afee8718 100644 --- a/src/theme/iconSelector.scss +++ b/src/theme/iconSelector.scss @@ -1,87 +1,87 @@ /* Popover 弹出框(图标选择器) ------------------------------- */ .icon-selector-popper { - padding: 0 !important; - .icon-selector-warp { - .icon-selector-warp-title { - height: 40px; - line-height: 40px; - padding: 0 15px; - } - .icon-selector-warp-row { - max-height: 260px; - overflow-y: auto; - padding: 15px 15px 5px; - border-top: 1px solid #ebeef5; - .ele-col:nth-last-child(1), - .ele-col:nth-last-child(2) { - display: none; - } - .awe-col:nth-child(-n + 24) { - display: none; - } - .icon-selector-warp-item { - display: flex; - border: 1px solid #ebeef5; - padding: 10px; - border-radius: 5px; - margin-bottom: 10px; - transition: all 0.3s ease; - .icon-selector-warp-item-value { - transition: all 0.3s ease; - i { - font-size: 20px; - color: #606266; - } - } - &:hover { - border: 1px solid var(--color-primary); - cursor: pointer; - transition: all 0.3s ease; - .icon-selector-warp-item-value { - i { - color: var(--color-primary); - transition: all 0.3s ease; - } - } - } - } - .icon-selector-active { - border: 1px solid var(--color-primary); - .icon-selector-warp-item-value { - i { - color: var(--color-primary); - } - } - } - } - .icon-selector-all { - .el-input { - padding: 0 15px; - margin-bottom: 10px; - } - &-tabs { - display: flex; - height: 30px; - line-height: 30px; - padding: 0 15px; - margin-bottom: 5px; - &-item { - flex: 1; - text-align: center; - cursor: pointer; - &:hover { - color: var(--color-primary); - } - } - &-active { - background: var(--color-primary); - border-radius: 5px; - .label { - color: #ffffff; - } - } - } - } - } + padding: 0 !important; + .icon-selector-warp { + .icon-selector-warp-title { + height: 40px; + line-height: 40px; + padding: 0 15px; + } + .icon-selector-warp-row { + max-height: 260px; + overflow-y: auto; + padding: 15px 15px 5px; + border-top: 1px solid #ebeef5; + .ele-col:nth-last-child(1), + .ele-col:nth-last-child(2) { + display: none; + } + .awe-col:nth-child(-n + 24) { + display: none; + } + .icon-selector-warp-item { + display: flex; + border: 1px solid #ebeef5; + padding: 10px; + border-radius: 5px; + margin-bottom: 10px; + transition: all 0.3s ease; + .icon-selector-warp-item-value { + transition: all 0.3s ease; + i { + font-size: 20px; + color: #606266; + } + } + &:hover { + border: 1px solid var(--color-primary); + cursor: pointer; + transition: all 0.3s ease; + .icon-selector-warp-item-value { + i { + color: var(--color-primary); + transition: all 0.3s ease; + } + } + } + } + .icon-selector-active { + border: 1px solid var(--color-primary); + .icon-selector-warp-item-value { + i { + color: var(--color-primary); + } + } + } + } + .icon-selector-all { + .el-input { + padding: 0 15px; + margin-bottom: 10px; + } + &-tabs { + display: flex; + height: 30px; + line-height: 30px; + padding: 0 15px; + margin-bottom: 5px; + &-item { + flex: 1; + text-align: center; + cursor: pointer; + &:hover { + color: var(--color-primary); + } + } + &-active { + background: var(--color-primary); + border-radius: 5px; + .label { + color: #ffffff; + } + } + } + } + } } diff --git a/src/theme/media/chart.scss b/src/theme/media/chart.scss index 07875689..93c0e1c0 100644 --- a/src/theme/media/chart.scss +++ b/src/theme/media/chart.scss @@ -3,88 +3,88 @@ /* 页面宽度小于768px ------------------------------- */ @media screen and (max-width: $sm) { - .big-data-down-left { - width: 100% !important; - flex-direction: unset !important; - flex-wrap: wrap; - .flex-warp-item { - min-height: 196.24px; - padding: 0 7.5px 15px 15px !important; - .flex-warp-item-box { - border: none !important; - border-bottom: 1px solid #ebeef5 !important; - } - } - } - .big-data-down-center { - width: 100% !important; - .big-data-down-center-one, - .big-data-down-center-two { - min-height: 196.24px; - padding-left: 15px !important; - .big-data-down-center-one-content { - border: none !important; - border-bottom: 1px solid #ebeef5 !important; - } - .flex-warp-item-box { - @extend .big-data-down-center-one-content; - } - } - } - .big-data-down-right { - .flex-warp-item { - &:nth-of-type(2) { - padding-left: 15px !important; - } - &:last-of-type { - .flex-warp-item-box { - border: none !important; - } - } - } - } + .big-data-down-left { + width: 100% !important; + flex-direction: unset !important; + flex-wrap: wrap; + .flex-warp-item { + min-height: 196.24px; + padding: 0 7.5px 15px 15px !important; + .flex-warp-item-box { + border: none !important; + border-bottom: 1px solid #ebeef5 !important; + } + } + } + .big-data-down-center { + width: 100% !important; + .big-data-down-center-one, + .big-data-down-center-two { + min-height: 196.24px; + padding-left: 15px !important; + .big-data-down-center-one-content { + border: none !important; + border-bottom: 1px solid #ebeef5 !important; + } + .flex-warp-item-box { + @extend .big-data-down-center-one-content; + } + } + } + .big-data-down-right { + .flex-warp-item { + &:nth-of-type(2) { + padding-left: 15px !important; + } + &:last-of-type { + .flex-warp-item-box { + border: none !important; + } + } + } + } } /* 页面宽度大于768px小于1200px ------------------------------- */ @media screen and (min-width: $sm) and (max-width: $lg) { - .chart-warp-bottom { - .big-data-down-left { - width: 50% !important; - } - .big-data-down-center { - width: 50% !important; - } - .big-data-down-right { - .flex-warp-item { - width: 50% !important; - &:nth-of-type(2) { - padding-left: 7.5px !important; - } - } - } - } + .chart-warp-bottom { + .big-data-down-left { + width: 50% !important; + } + .big-data-down-center { + width: 50% !important; + } + .big-data-down-right { + .flex-warp-item { + width: 50% !important; + &:nth-of-type(2) { + padding-left: 7.5px !important; + } + } + } + } } /* 页面宽度小于1200px ------------------------------- */ @media screen and (max-width: $lg) { - .chart-warp-top { - .up-left { - display: none; - } - } - .chart-warp-bottom { - overflow-y: auto !important; - flex-wrap: wrap; - .big-data-down-right { - width: 100% !important; - flex-direction: unset !important; - flex-wrap: wrap; - .flex-warp-item { - min-height: 196.24px; - padding: 0 7.5px 15px 15px !important; - } - } - } + .chart-warp-top { + .up-left { + display: none; + } + } + .chart-warp-bottom { + overflow-y: auto !important; + flex-wrap: wrap; + .big-data-down-right { + width: 100% !important; + flex-direction: unset !important; + flex-wrap: wrap; + .flex-warp-item { + min-height: 196.24px; + padding: 0 7.5px 15px 15px !important; + } + } + } } diff --git a/src/theme/media/cityLinkage.scss b/src/theme/media/cityLinkage.scss index 524f6136..1394156e 100644 --- a/src/theme/media/cityLinkage.scss +++ b/src/theme/media/cityLinkage.scss @@ -3,8 +3,8 @@ /* 页面宽度小于576px ------------------------------- */ @media screen and (max-width: $xs) { - .el-cascader__dropdown.el-popper { - overflow: auto; - max-width: 100%; - } + .el-cascader__dropdown.el-popper { + overflow: auto; + max-width: 100%; + } } diff --git a/src/theme/media/dialog.scss b/src/theme/media/dialog.scss index 9986ee9e..5a6e5725 100644 --- a/src/theme/media/dialog.scss +++ b/src/theme/media/dialog.scss @@ -3,7 +3,7 @@ /* 页面宽度小于800px ------------------------------- */ @media screen and (max-width: 800px) { - .el-dialog { - width: 90% !important; - } + .el-dialog { + width: 90% !important; + } } diff --git a/src/theme/media/error.scss b/src/theme/media/error.scss index b0b32bba..727b7c41 100644 --- a/src/theme/media/error.scss +++ b/src/theme/media/error.scss @@ -3,33 +3,33 @@ /* 页面宽度小于768px ------------------------------- */ @media screen and (max-width: $sm) { - .error { - .error-flex { - flex-direction: column-reverse !important; - height: auto !important; - width: 100% !important; - } - .right, - .left { - flex: unset !important; - display: flex !important; - } - .left-item { - margin: auto !important; - } - .right img { - max-width: 450px !important; - @extend .left-item; - } - } + .error { + .error-flex { + flex-direction: column-reverse !important; + height: auto !important; + width: 100% !important; + } + .right, + .left { + flex: unset !important; + display: flex !important; + } + .left-item { + margin: auto !important; + } + .right img { + max-width: 450px !important; + @extend .left-item; + } + } } /* 页面宽度大于768px小于992px ------------------------------- */ @media screen and (min-width: $sm) and (max-width: $md) { - .error { - .error-flex { - padding-left: 30px !important; - } - } + .error { + .error-flex { + padding-left: 30px !important; + } + } } diff --git a/src/theme/media/form.scss b/src/theme/media/form.scss index a445762d..7078e10a 100644 --- a/src/theme/media/form.scss +++ b/src/theme/media/form.scss @@ -3,11 +3,11 @@ /* 页面宽度小于576px ------------------------------- */ @media screen and (max-width: $xs) { - .el-form-item__label { - width: 100% !important; - text-align: left !important; - } - .el-form-item__content { - margin-left: 0 !important; - } + .el-form-item__label { + width: 100% !important; + text-align: left !important; + } + .el-form-item__content { + margin-left: 0 !important; + } } diff --git a/src/theme/media/home.scss b/src/theme/media/home.scss index ffddf857..5005279f 100644 --- a/src/theme/media/home.scss +++ b/src/theme/media/home.scss @@ -3,8 +3,8 @@ /* 页面宽度小于768px ------------------------------- */ @media screen and (max-width: $sm) { - .home-warning-media, - .home-dynamic-media { - margin-top: 15px; - } + .home-warning-media, + .home-dynamic-media { + margin-top: 15px; + } } diff --git a/src/theme/media/layout.scss b/src/theme/media/layout.scss index 8f96e99a..77cbec0c 100644 --- a/src/theme/media/layout.scss +++ b/src/theme/media/layout.scss @@ -3,53 +3,53 @@ /* 页面宽度小于576px ------------------------------- */ @media screen and (max-width: $xs) { - // MessageBox 弹框 - .el-message-box { - width: 80% !important; - } + // MessageBox 弹框 + .el-message-box { + width: 80% !important; + } } /* 页面宽度小于768px ------------------------------- */ @media screen and (max-width: $sm) { - // Breadcrumb 面包屑 - .layout-navbars-breadcrumb-hide { - display: none; - } - // 外链视图 - .layout-view-link { - a { - max-width: 80%; - text-align: center; - } - } - // 菜单搜索 - .layout-search-dialog { - .el-autocomplete { - width: 80% !important; - } - } + // Breadcrumb 面包屑 + .layout-navbars-breadcrumb-hide { + display: none; + } + // 外链视图 + .layout-view-link { + a { + max-width: 80%; + text-align: center; + } + } + // 菜单搜索 + .layout-search-dialog { + .el-autocomplete { + width: 80% !important; + } + } } /* 页面宽度小于1000px ------------------------------- */ @media screen and (max-width: 1000px) { - // 布局配置 - .layout-drawer-content-flex { - position: relative; - &::after { - content: '手机版不支持切换布局'; - position: absolute; - top: 0; - right: 0; - bottom: 0; - left: 0; - z-index: 1; - text-align: center; - height: 140px; - line-height: 140px; - background: rgba(255, 255, 255, 0.9); - color: #666666; - } - } + // 布局配置 + .layout-drawer-content-flex { + position: relative; + &::after { + content: '手机版不支持切换布局'; + position: absolute; + top: 0; + right: 0; + bottom: 0; + left: 0; + z-index: 1; + text-align: center; + height: 140px; + line-height: 140px; + background: rgba(255, 255, 255, 0.9); + color: #666666; + } + } } diff --git a/src/theme/media/login.scss b/src/theme/media/login.scss index 68cdcc76..abd727dc 100644 --- a/src/theme/media/login.scss +++ b/src/theme/media/login.scss @@ -3,19 +3,19 @@ /* 页面宽度小于576px ------------------------------- */ @media screen and (max-width: $xs) { - .login-container { - .login-content { - width: 90% !important; - padding: 20px 0 !important; - } - .login-content-form-btn { - width: 100% !important; - padding: 12px 0 !important; - } - .login-copyright { - .login-copyright-msg { - white-space: unset !important; - } - } - } + .login-container { + .login-content { + width: 90% !important; + padding: 20px 0 !important; + } + .login-content-form-btn { + width: 100% !important; + padding: 12px 0 !important; + } + .login-copyright { + .login-copyright-msg { + white-space: unset !important; + } + } + } } diff --git a/src/theme/media/pagination.scss b/src/theme/media/pagination.scss index a09a9e6e..400ebaaf 100644 --- a/src/theme/media/pagination.scss +++ b/src/theme/media/pagination.scss @@ -3,13 +3,13 @@ /* 页面宽度小于576px ------------------------------- */ @media screen and (max-width: $xs) { - .el-pager, - .el-pagination__jump { - display: none !important; - } + .el-pager, + .el-pagination__jump { + display: none !important; + } } // 默认居中对齐 .el-pagination { - text-align: center !important; + text-align: center !important; } diff --git a/src/theme/media/personal.scss b/src/theme/media/personal.scss index 4ec043e1..7ec0d4ab 100644 --- a/src/theme/media/personal.scss +++ b/src/theme/media/personal.scss @@ -3,14 +3,14 @@ /* 页面宽度小于768px ------------------------------- */ @media screen and (max-width: $sm) { - .personal-info { - padding-left: 0 !important; - margin-top: 15px; - } - .personal-recommend-col { - margin-bottom: 15px; - &:last-of-type { - margin-bottom: 0; - } - } + .personal-info { + padding-left: 0 !important; + margin-top: 15px; + } + .personal-recommend-col { + margin-bottom: 15px; + &:last-of-type { + margin-bottom: 0; + } + } } diff --git a/src/theme/media/scrollbar.scss b/src/theme/media/scrollbar.scss index d31c7801..b63b3725 100644 --- a/src/theme/media/scrollbar.scss +++ b/src/theme/media/scrollbar.scss @@ -3,54 +3,54 @@ /* 页面宽度小于768px ------------------------------- */ @media screen and (max-width: $sm) { - // 滚动条的宽度 - ::-webkit-scrollbar { - width: 3px !important; - height: 3px !important; - } - ::-webkit-scrollbar-track-piece { - background-color: #f8f8f8; - } - // 滚动条的设置 - ::-webkit-scrollbar-thumb { - background-color: rgba(144, 147, 153, 0.3); - background-clip: padding-box; - min-height: 28px; - border-radius: 5px; - transition: 0.3s background-color; - } - ::-webkit-scrollbar-thumb:hover { - background-color: rgba(144, 147, 153, 0.5); - } - // element plus scrollbar - .el-scrollbar__bar.is-vertical { - width: 2px !important; - } - .el-scrollbar__bar.is-horizontal { - height: 2px !important; - } + // 滚动条的宽度 + ::-webkit-scrollbar { + width: 3px !important; + height: 3px !important; + } + ::-webkit-scrollbar-track-piece { + background-color: #f8f8f8; + } + // 滚动条的设置 + ::-webkit-scrollbar-thumb { + background-color: rgba(144, 147, 153, 0.3); + background-clip: padding-box; + min-height: 28px; + border-radius: 5px; + transition: 0.3s background-color; + } + ::-webkit-scrollbar-thumb:hover { + background-color: rgba(144, 147, 153, 0.5); + } + // element plus scrollbar + .el-scrollbar__bar.is-vertical { + width: 2px !important; + } + .el-scrollbar__bar.is-horizontal { + height: 2px !important; + } } /* 页面宽度大于768px ------------------------------- */ @media screen and (min-width: 769px) { - // 滚动条的宽度 - ::-webkit-scrollbar { - width: 7px; - height: 7px; - } - ::-webkit-scrollbar-track-piece { - background-color: #f8f8f8; - } - // 滚动条的设置 - ::-webkit-scrollbar-thumb { - background-color: rgba(144, 147, 153, 0.3); - background-clip: padding-box; - min-height: 28px; - border-radius: 5px; - transition: 0.3s background-color; - } - ::-webkit-scrollbar-thumb:hover { - background-color: rgba(144, 147, 153, 0.5); - } + // 滚动条的宽度 + ::-webkit-scrollbar { + width: 7px; + height: 7px; + } + ::-webkit-scrollbar-track-piece { + background-color: #f8f8f8; + } + // 滚动条的设置 + ::-webkit-scrollbar-thumb { + background-color: rgba(144, 147, 153, 0.3); + background-clip: padding-box; + min-height: 28px; + border-radius: 5px; + transition: 0.3s background-color; + } + ::-webkit-scrollbar-thumb:hover { + background-color: rgba(144, 147, 153, 0.5); + } } diff --git a/src/theme/media/tagsView.scss b/src/theme/media/tagsView.scss index ffa544ea..b71674ef 100644 --- a/src/theme/media/tagsView.scss +++ b/src/theme/media/tagsView.scss @@ -3,9 +3,9 @@ /* 页面宽度小于768px ------------------------------- */ @media screen and (max-width: $sm) { - .tags-view-form { - .tags-view-form-col { - margin-bottom: 20px; - } - } + .tags-view-form { + .tags-view-form-col { + margin-bottom: 20px; + } + } } diff --git a/src/theme/mixins/element-mixins.scss b/src/theme/mixins/element-mixins.scss index 8c9fe626..81611e63 100644 --- a/src/theme/mixins/element-mixins.scss +++ b/src/theme/mixins/element-mixins.scss @@ -1,34 +1,34 @@ /* Button 按钮 ------------------------------- */ @mixin Button($main, $c1, $c2) { - color: set-color($main); - background: set-color($c1); - border-color: set-color($c2); + color: set-color($main); + background: set-color($c1); + border-color: set-color($c2); } /* Radio 单选框、Checkbox 多选框 ------------------------------- */ @mixin RadioCheckbox($name) { - background-color: set-color($name); - border-color: set-color($name); + background-color: set-color($name); + border-color: set-color($name); } /* Tag 标签 ------------------------------- */ @mixin Tag($main, $c1, $c2) { - color: set-color($main); - background-color: set-color($c1); - border-color: set-color($c2); + color: set-color($main); + background-color: set-color($c1); + border-color: set-color($c2); } @mixin TagDark($main, $c1) { - color: set-color($main); - background-color: set-color($c1); + color: set-color($main); + background-color: set-color($c1); } /* Alert 警告 ------------------------------- */ @mixin Alert($main, $c1, $c2) { - color: set-color($main); - background: set-color($c1); - border: 1px solid set-color($c2); + color: set-color($main); + background: set-color($c1); + border: 1px solid set-color($c2); } diff --git a/src/theme/mixins/function.scss b/src/theme/mixins/function.scss index 3ce18f1b..ed27a8f7 100644 --- a/src/theme/mixins/function.scss +++ b/src/theme/mixins/function.scss @@ -1,5 +1,5 @@ /* 颜色调用函数 ------------------------------- */ @function set-color($key) { - @return var(--color-#{$key}); + @return var(--color-#{$key}); } diff --git a/src/theme/mixins/mixins.scss b/src/theme/mixins/mixins.scss index 41b660ca..f98f101f 100644 --- a/src/theme/mixins/mixins.scss +++ b/src/theme/mixins/mixins.scss @@ -1,20 +1,20 @@ /* 文本不换行 ------------------------------- */ @mixin text-no-wrap() { - text-overflow: ellipsis; - overflow: hidden; - white-space: nowrap; + text-overflow: ellipsis; + overflow: hidden; + white-space: nowrap; } /* 多行文本溢出 ------------------------------- */ @mixin text-ellipsis($line: 2) { - overflow: hidden; - word-break: break-all; - text-overflow: ellipsis; - display: -webkit-box; - -webkit-line-clamp: $line; - -webkit-box-orient: vertical; + overflow: hidden; + word-break: break-all; + text-overflow: ellipsis; + display: -webkit-box; + -webkit-line-clamp: $line; + -webkit-box-orient: vertical; } /* 滚动条(页面未使用) div 中使用: @@ -23,22 +23,22 @@ // @include scrollBar; // } @mixin scrollBar { - // 滚动条凹槽的颜色,还可以设置边框属性 - &::-webkit-scrollbar-track-piece { - background-color: #f8f8f8; - } - // 滚动条的宽度 - &::-webkit-scrollbar { - width: 9px; - height: 9px; - } - // 滚动条的设置 - &::-webkit-scrollbar-thumb { - background-color: #dddddd; - background-clip: padding-box; - min-height: 28px; - } - &::-webkit-scrollbar-thumb:hover { - background-color: #bbb; - } + // 滚动条凹槽的颜色,还可以设置边框属性 + &::-webkit-scrollbar-track-piece { + background-color: #f8f8f8; + } + // 滚动条的宽度 + &::-webkit-scrollbar { + width: 9px; + height: 9px; + } + // 滚动条的设置 + &::-webkit-scrollbar-thumb { + background-color: #dddddd; + background-clip: padding-box; + min-height: 28px; + } + &::-webkit-scrollbar-thumb:hover { + background-color: #bbb; + } } diff --git a/src/theme/other.scss b/src/theme/other.scss index 583ad230..3077819c 100644 --- a/src/theme/other.scss +++ b/src/theme/other.scss @@ -1,16 +1,16 @@ /* wangeditor富文本编辑器 ------------------------------- */ .w-e-toolbar { - border: 1px solid #ebeef5 !important; - border-bottom: 1px solid #ebeef5 !important; - border-top-left-radius: 3px; - border-top-right-radius: 3px; - z-index: 2 !important; + border: 1px solid #ebeef5 !important; + border-bottom: 1px solid #ebeef5 !important; + border-top-left-radius: 3px; + border-top-right-radius: 3px; + z-index: 2 !important; } .w-e-text-container { - border: 1px solid #ebeef5 !important; - border-top: none !important; - border-bottom-left-radius: 3px; - border-bottom-right-radius: 3px; - z-index: 1 !important; + border: 1px solid #ebeef5 !important; + border-top: none !important; + border-bottom-left-radius: 3px; + border-bottom-right-radius: 3px; + z-index: 1 !important; } diff --git a/src/utils/arrayOperation.ts b/src/utils/arrayOperation.ts index 57ae6388..a5550658 100644 --- a/src/utils/arrayOperation.ts +++ b/src/utils/arrayOperation.ts @@ -1,11 +1,11 @@ // 判断两数组是否相同 export function judementSameArr(news: Array, old: Array) { - let count = 0 - const leng = old.length - for (let i in old) { - for (let j in news) { - if (old[i] === news[j]) count++ - } - } - return count === leng ? true : false -} \ No newline at end of file + let count = 0; + const leng = old.length; + for (let i in old) { + for (let j in news) { + if (old[i] === news[j]) count++; + } + } + return count === leng ? true : false; +} diff --git a/src/utils/authDirective.ts b/src/utils/authDirective.ts index 6aa2bea5..cb110972 100644 --- a/src/utils/authDirective.ts +++ b/src/utils/authDirective.ts @@ -1,31 +1,31 @@ -import type { App } from 'vue' -import { store } from "/@/store/index.ts"; -import { judementSameArr } from '/@/utils/arrayOperation.ts' +import type { App } from 'vue'; +import { store } from '/@/store/index.ts'; +import { judementSameArr } from '/@/utils/arrayOperation.ts'; export function authDirective(app: App) { - // 单个权限验证(v-auth="xxx") - app.directive('auth', { - mounted(el, binding) { - if (!store.state.userInfos.authBtnList.some((v: any) => v === binding.value)) el.parentNode.removeChild(el) - } - }) - // 多个权限验证,满足一个则显示(v-auths="[xxx,xxx]") - app.directive('auths', { - mounted(el, binding) { - let flag = false - store.state.userInfos.authBtnList.map((val: any) => { - binding.value.map((v: any) => { - if (val === v) flag = true - }) - }) - if (!flag) el.parentNode.removeChild(el) - } - }) - // 多个权限验证,全部满足则显示(v-auth-all="[xxx,xxx]") - app.directive('auth-all', { - mounted(el, binding) { - const flag = judementSameArr(binding.value, store.state.userInfos.authBtnList) - if (!flag) el.parentNode.removeChild(el) - } - }) -} \ No newline at end of file + // 单个权限验证(v-auth="xxx") + app.directive('auth', { + mounted(el, binding) { + if (!store.state.userInfos.userInfos.authBtnList.some((v: any) => v === binding.value)) el.parentNode.removeChild(el); + }, + }); + // 多个权限验证,满足一个则显示(v-auths="[xxx,xxx]") + app.directive('auths', { + mounted(el, binding) { + let flag = false; + store.state.userInfos.userInfos.authBtnList.map((val: any) => { + binding.value.map((v: any) => { + if (val === v) flag = true; + }); + }); + if (!flag) el.parentNode.removeChild(el); + }, + }); + // 多个权限验证,全部满足则显示(v-auth-all="[xxx,xxx]") + app.directive('auth-all', { + mounted(el, binding) { + const flag = judementSameArr(binding.value, store.state.userInfos.userInfos.authBtnList); + if (!flag) el.parentNode.removeChild(el); + }, + }); +} diff --git a/src/utils/authFunction.ts b/src/utils/authFunction.ts index 9ec1e811..bad26095 100644 --- a/src/utils/authFunction.ts +++ b/src/utils/authFunction.ts @@ -1,24 +1,23 @@ -import { store } from "/@/store/index.ts"; -import { judementSameArr } from '/@/utils/arrayOperation.ts' +import { store } from '/@/store/index.ts'; +import { judementSameArr } from '/@/utils/arrayOperation.ts'; // 单个权限验证 export function auth(value: string) { - return store.state.userInfos.authBtnList.some((v: any) => v === value) + return store.state.userInfos.userInfos.authBtnList.some((v: any) => v === value); } // 多个权限验证,满足一个则为 true export function auths(value: Array) { - let flag = false - store.state.userInfos.authBtnList.map((val: any) => { - value.map((v: any) => { - if (val === v) flag = true - }) - }) - return flag + let flag = false; + store.state.userInfos.userInfos.authBtnList.map((val: any) => { + value.map((v: any) => { + if (val === v) flag = true; + }); + }); + return flag; } // 多个权限验证,全部满足则为 true export function authAll(value: Array) { - return judementSameArr(value, store.state.userInfos.authBtnList) + return judementSameArr(value, store.state.userInfos.userInfos.authBtnList); } - diff --git a/src/utils/formatTime.ts b/src/utils/formatTime.ts index 34ce91c7..96b8be73 100644 --- a/src/utils/formatTime.ts +++ b/src/utils/formatTime.ts @@ -12,42 +12,43 @@ * formatDate(date, "YYYY-mm-dd HH:MM:SS WWW QQQQ") // 2020-02-09 14:46:12 星期日 第一季度 */ export function formatDate(date: Date, format: string) { - let we = date.getDay() // 星期 - let qut = Math.floor((date.getMonth() + 3) / 3).toString() // 季度 - const opt: any = { - "Y+": date.getFullYear().toString(), // 年 - "m+": (date.getMonth() + 1).toString(), // 月(月份从0开始,要+1) - "d+": date.getDate().toString(), // 日 - "H+": date.getHours().toString(), // 时 - "M+": date.getMinutes().toString(), // 分 - "S+": date.getSeconds().toString(), // 秒 - "q+": qut, // 季度 - } - // 中文数字 (星期) - const week: any = { - "0": "日", - "1": "一", - "2": "二", - "3": "三", - "4": "四", - "5": "五", - "6": "六", - } - // 中文数字(季度) - const quarter: any = { - "1": "一", - "2": "二", - "3": "三", - "4": "四", - } - if (/(W+)/.test(format)) format = format.replace(RegExp.$1, RegExp.$1.length > 1 ? RegExp.$1.length > 2 ? "星期" + week[we] : "周" + week[we] : week[we]) - if (/(Q+)/.test(format)) format = format.replace(RegExp.$1, RegExp.$1.length == 4 ? "第" + quarter[qut] + "季度" : quarter[qut]) - for (let k in opt) { - let r = new RegExp("(" + k + ")").exec(format); - // 若输入的长度不为1,则前面补零 - if (r) format = format.replace(r[1], RegExp.$1.length == 1 ? opt[k] : opt[k].padStart(RegExp.$1.length, "0")) - } - return format + let we = date.getDay(); // 星期 + let qut = Math.floor((date.getMonth() + 3) / 3).toString(); // 季度 + const opt: any = { + 'Y+': date.getFullYear().toString(), // 年 + 'm+': (date.getMonth() + 1).toString(), // 月(月份从0开始,要+1) + 'd+': date.getDate().toString(), // 日 + 'H+': date.getHours().toString(), // 时 + 'M+': date.getMinutes().toString(), // 分 + 'S+': date.getSeconds().toString(), // 秒 + 'q+': qut, // 季度 + }; + // 中文数字 (星期) + const week: any = { + '0': '日', + '1': '一', + '2': '二', + '3': '三', + '4': '四', + '5': '五', + '6': '六', + }; + // 中文数字(季度) + const quarter: any = { + '1': '一', + '2': '二', + '3': '三', + '4': '四', + }; + if (/(W+)/.test(format)) + format = format.replace(RegExp.$1, RegExp.$1.length > 1 ? (RegExp.$1.length > 2 ? '星期' + week[we] : '周' + week[we]) : week[we]); + if (/(Q+)/.test(format)) format = format.replace(RegExp.$1, RegExp.$1.length == 4 ? '第' + quarter[qut] + '季度' : quarter[qut]); + for (let k in opt) { + let r = new RegExp('(' + k + ')').exec(format); + // 若输入的长度不为1,则前面补零 + if (r) format = format.replace(r[1], RegExp.$1.length == 1 ? opt[k] : opt[k].padStart(RegExp.$1.length, '0')); + } + return format; } /** @@ -67,52 +68,52 @@ export function formatDate(date: Date, format: string) { * formatPast("2020-06-01") // 2020-06-01 * formatPast("2020-06-01", "YYYY-mm-dd HH:MM:SS WWW QQQQ") // 2020-06-01 08:00:00 星期一 第二季度 */ -export function formatPast(param: any, format: string = "YYYY-mm-dd") { - // 传入格式处理、存储转换值 - let t: any, s: any - // 获取js 时间戳 - let time: any = new Date().getTime() - // 是否是对象 - typeof param === "string" || "object" ? (t = new Date(param).getTime()) : (t = param) - // 当前时间戳 - 传入时间戳 - time = Number.parseInt(`${time - t}`) - if (time < 10000) { - // 10秒内 - return "刚刚" - } else if (time < 60000 && time >= 10000) { - // 超过10秒少于1分钟内 - s = Math.floor(time / 1000) - return `${s}秒前` - } else if (time < 3600000 && time >= 60000) { - // 超过1分钟少于1小时 - s = Math.floor(time / 60000) - return `${s}分钟前` - } else if (time < 86400000 && time >= 3600000) { - // 超过1小时少于24小时 - s = Math.floor(time / 3600000) - return `${s}小时前` - } else if (time < 259200000 && time >= 86400000) { - // 超过1天少于3天内 - s = Math.floor(time / 86400000) - return `${s}天前` - } else { - // 超过3天 - let date = typeof param === "string" || "object" ? new Date(param) : param - return formatDate(date, format); - } +export function formatPast(param: any, format: string = 'YYYY-mm-dd') { + // 传入格式处理、存储转换值 + let t: any, s: any; + // 获取js 时间戳 + let time: any = new Date().getTime(); + // 是否是对象 + typeof param === 'string' || 'object' ? (t = new Date(param).getTime()) : (t = param); + // 当前时间戳 - 传入时间戳 + time = Number.parseInt(`${time - t}`); + if (time < 10000) { + // 10秒内 + return '刚刚'; + } else if (time < 60000 && time >= 10000) { + // 超过10秒少于1分钟内 + s = Math.floor(time / 1000); + return `${s}秒前`; + } else if (time < 3600000 && time >= 60000) { + // 超过1分钟少于1小时 + s = Math.floor(time / 60000); + return `${s}分钟前`; + } else if (time < 86400000 && time >= 3600000) { + // 超过1小时少于24小时 + s = Math.floor(time / 3600000); + return `${s}小时前`; + } else if (time < 259200000 && time >= 86400000) { + // 超过1天少于3天内 + s = Math.floor(time / 86400000); + return `${s}天前`; + } else { + // 超过3天 + let date = typeof param === 'string' || 'object' ? new Date(param) : param; + return formatDate(date, format); + } } /** * formatAxis(new Date()) // 上午好 */ export function formatAxis(param: any) { - let hour: number = new Date(param).getHours() - if (hour < 6) return "凌晨好" - else if (hour < 9) return "早上好" - else if (hour < 12) return "上午好" - else if (hour < 14) return "中午好" - else if (hour < 17) return "下午好" - else if (hour < 19) return "傍晚好" - else if (hour < 22) return "晚上好" - else return "夜里好" + let hour: number = new Date(param).getHours(); + if (hour < 6) return '凌晨好'; + else if (hour < 9) return '早上好'; + else if (hour < 12) return '上午好'; + else if (hour < 14) return '中午好'; + else if (hour < 17) return '下午好'; + else if (hour < 19) return '傍晚好'; + else if (hour < 22) return '晚上好'; + else return '夜里好'; } diff --git a/src/utils/getStyleSheets.ts b/src/utils/getStyleSheets.ts index 6cae6b59..10a6c8c5 100644 --- a/src/utils/getStyleSheets.ts +++ b/src/utils/getStyleSheets.ts @@ -1,111 +1,96 @@ -import { nextTick } from "vue" +import { nextTick } from 'vue'; // 获取阿里字体图标 const getAlicdnIconfont = () => { - return new Promise((resolve, reject) => { - nextTick(() => { - const styles: any = document.styleSheets - let sheetsList = [] - let sheetsIconList = [] - for (let i = 0; i < styles.length; i++) { - if (styles[i].href && styles[i].href.indexOf("at.alicdn.com") > -1) { - sheetsList.push(styles[i]) - } - } - for (let i = 0; i < sheetsList.length; i++) { - for (let j = 0; j < sheetsList[i].cssRules.length; j++) { - if ( - sheetsList[i].cssRules[j].selectorText && - sheetsList[i].cssRules[j].selectorText.indexOf(".icon-") > -1 - ) { - sheetsIconList.push( - `${sheetsList[i].cssRules[j].selectorText - .substring(1, sheetsList[i].cssRules[j].selectorText.length) - .replace(/\:\:before/gi, "")}` - ) - } - } - } - if (sheetsIconList.length > 0) resolve(sheetsIconList) - else reject('未获取到值,请刷新重试') - }) - }) -} + return new Promise((resolve, reject) => { + nextTick(() => { + const styles: any = document.styleSheets; + let sheetsList = []; + let sheetsIconList = []; + for (let i = 0; i < styles.length; i++) { + if (styles[i].href && styles[i].href.indexOf('at.alicdn.com') > -1) { + sheetsList.push(styles[i]); + } + } + for (let i = 0; i < sheetsList.length; i++) { + for (let j = 0; j < sheetsList[i].cssRules.length; j++) { + if (sheetsList[i].cssRules[j].selectorText && sheetsList[i].cssRules[j].selectorText.indexOf('.icon-') > -1) { + sheetsIconList.push( + `${sheetsList[i].cssRules[j].selectorText.substring(1, sheetsList[i].cssRules[j].selectorText.length).replace(/\:\:before/gi, '')}` + ); + } + } + } + if (sheetsIconList.length > 0) resolve(sheetsIconList); + else reject('未获取到值,请刷新重试'); + }); + }); +}; // 初始化获取 css 样式,获取 element plus 自带图标 const elementPlusIconfont = () => { - return new Promise((resolve, reject) => { - nextTick(() => { - const styles: any = document.styleSheets - let sheetsIconList = [] - for (let i = 0; i < styles.length; i++) { - for (let j = 0; j < styles[i].cssRules.length; j++) { - if ( - styles[i].cssRules[j].selectorText && - styles[i].cssRules[j].selectorText.indexOf(".el-icon-") === 0 - ) { - sheetsIconList.push( - `${styles[i].cssRules[j].selectorText - .substring(1, styles[i].cssRules[j].selectorText.length) - .replace(/\:\:before/gi, "")}` - ) - } - } - } - if (sheetsIconList.length > 0) resolve(sheetsIconList) - else reject('未获取到值,请刷新重试') - }) - }) -} + return new Promise((resolve, reject) => { + nextTick(() => { + const styles: any = document.styleSheets; + let sheetsIconList = []; + for (let i = 0; i < styles.length; i++) { + for (let j = 0; j < styles[i].cssRules.length; j++) { + if (styles[i].cssRules[j].selectorText && styles[i].cssRules[j].selectorText.indexOf('.el-icon-') === 0) { + sheetsIconList.push( + `${styles[i].cssRules[j].selectorText.substring(1, styles[i].cssRules[j].selectorText.length).replace(/\:\:before/gi, '')}` + ); + } + } + } + if (sheetsIconList.length > 0) resolve(sheetsIconList); + else reject('未获取到值,请刷新重试'); + }); + }); +}; // 初始化获取 css 样式,这里使用 fontawesome 的图标 const awesomeIconfont = () => { - return new Promise((resolve, reject) => { - nextTick(() => { - const styles: any = document.styleSheets - let sheetsList = [] - let sheetsIconList = [] - for (let i = 0; i < styles.length; i++) { - if ( - styles[i].href && - styles[i].href.indexOf("netdna.bootstrapcdn.com") > -1 - ) { - sheetsList.push(styles[i]) - } - } - for (let i = 0; i < sheetsList.length; i++) { - for (let j = 0; j < sheetsList[i].cssRules.length; j++) { - if ( - sheetsList[i].cssRules[j].selectorText && - sheetsList[i].cssRules[j].selectorText.indexOf(".fa-") === 0 && - sheetsList[i].cssRules[j].selectorText.indexOf(",") === -1 - ) { - sheetsIconList.push( - `${sheetsList[i].cssRules[j].selectorText - .substring(1, sheetsList[i].cssRules[j].selectorText.length) - .replace(/\:\:before/gi, "")}` - ) - } - } - } - if (sheetsIconList.length > 0) resolve(sheetsIconList) - else reject('未获取到值,请刷新重试') - }) - }) -} + return new Promise((resolve, reject) => { + nextTick(() => { + const styles: any = document.styleSheets; + let sheetsList = []; + let sheetsIconList = []; + for (let i = 0; i < styles.length; i++) { + if (styles[i].href && styles[i].href.indexOf('netdna.bootstrapcdn.com') > -1) { + sheetsList.push(styles[i]); + } + } + for (let i = 0; i < sheetsList.length; i++) { + for (let j = 0; j < sheetsList[i].cssRules.length; j++) { + if ( + sheetsList[i].cssRules[j].selectorText && + sheetsList[i].cssRules[j].selectorText.indexOf('.fa-') === 0 && + sheetsList[i].cssRules[j].selectorText.indexOf(',') === -1 + ) { + sheetsIconList.push( + `${sheetsList[i].cssRules[j].selectorText.substring(1, sheetsList[i].cssRules[j].selectorText.length).replace(/\:\:before/gi, '')}` + ); + } + } + } + if (sheetsIconList.length > 0) resolve(sheetsIconList); + else reject('未获取到值,请刷新重试'); + }); + }); +}; // 定义导出方法集合 const initIconfont = { - ali: () => { - return getAlicdnIconfont() - }, - ele: () => { - return elementPlusIconfont() - }, - awe: () => { - return awesomeIconfont() - } -} + ali: () => { + return getAlicdnIconfont(); + }, + ele: () => { + return elementPlusIconfont(); + }, + awe: () => { + return awesomeIconfont(); + }, +}; // 导出方法 -export default initIconfont \ No newline at end of file +export default initIconfont; diff --git a/src/utils/request.ts b/src/utils/request.ts index de4ccb6b..c28e95ef 100644 --- a/src/utils/request.ts +++ b/src/utils/request.ts @@ -1,27 +1,27 @@ -import axios from "axios" -import { ElMessage, ElMessageBox } from "element-plus" -import { clearSession, getSession } from "/@/utils/storage.ts" -import router, { resetRoute } from "/@/router/index.ts" +import axios from 'axios'; +import { ElMessage, ElMessageBox } from 'element-plus'; +import { clearSession, getSession } from '/@/utils/storage.ts'; +import router, { resetRoute } from '/@/router/index.ts'; // 配置新建一个 axios 实例 const service = axios.create({ baseURL: 'http://localhost:10000/', timeout: 50000, - headers: { "Content-Type": "application/json" } + headers: { 'Content-Type': 'application/json' }, }); // 添加请求拦截器 service.interceptors.request.use( (config) => { // 在发送请求之前做些什么 token - if (getSession("token")) { - config.headers.common["Authorization"] = `${getSession("token")}` + if (getSession('token')) { + config.headers.common['Authorization'] = `${getSession('token')}`; } - return config + return config; }, (error) => { // 对请求错误做些什么 - return Promise.reject(error) + return Promise.reject(error); } ); @@ -29,32 +29,34 @@ service.interceptors.request.use( service.interceptors.response.use( (response) => { // 对响应数据做点什么 - const res = response.data + const res = response.data; if (res.code && res.code !== 0) { // `token` 过期或者账号已在别处登录 if (res.code === 401 || res.code === 4001) { clearSession(); // 清除浏览器全部临时缓存 - router.push("/login") // 去登录页面 - resetRoute() // 删除/重置路由 - ElMessageBox.alert('你已被登出,请重新登录', '提示', {}).then(() => { }).catch(() => { }) + router.push('/login'); // 去登录页面 + resetRoute(); // 删除/重置路由 + ElMessageBox.alert('你已被登出,请重新登录', '提示', {}) + .then(() => {}) + .catch(() => {}); } - return Promise.reject(service.interceptors.response) + return Promise.reject(service.interceptors.response); } else { - return response.data + return response.data; } }, (error) => { // 对响应错误做点什么 - if (error.message.indexOf("timeout") != -1) { - ElMessage.error("网络超时") - } else if (error.message == "Network Error") { - ElMessage.error("网络连接错误") + if (error.message.indexOf('timeout') != -1) { + ElMessage.error('网络超时'); + } else if (error.message == 'Network Error') { + ElMessage.error('网络连接错误'); } else { - if (error.response.data) ElMessage.error(error.response.statusText) - else ElMessage.error('接口路径找不到') + if (error.response.data) ElMessage.error(error.response.statusText); + else ElMessage.error('接口路径找不到'); } - return Promise.reject(error) + return Promise.reject(error); } ); -export default service +export default service; diff --git a/src/utils/setIconfont.ts b/src/utils/setIconfont.ts index 52270d89..4b821599 100644 --- a/src/utils/setIconfont.ts +++ b/src/utils/setIconfont.ts @@ -1,45 +1,42 @@ // 字体图标 url const cssCdnUrlList: Array = [ - '//at.alicdn.com/t/font_2298093_n459lh5kpoh.css', - '//netdna.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css' -] + '//at.alicdn.com/t/font_2298093_rwhkigmjh19.css', + '//netdna.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css', +]; // 第三方 js url -const jsCdnUrlList: Array = [ - 'https://gw.alipayobjects.com/os/antv/pkg/_antv.g6-3.8.1/dist/g6.min.js', - 'https://cdn.bootcdn.net/ajax/libs/qrcodejs/1.0.0/qrcode.min.js' -] +const jsCdnUrlList: Array = []; // 动态设置字体图标 export function setCssCdn() { - if (cssCdnUrlList.length <= 0) return false - cssCdnUrlList.map(v => { - let link = document.createElement('link') - link.rel = 'stylesheet' - link.href = v - link.crossOrigin = 'anonymous' - document.getElementsByTagName('head')[0].appendChild(link) - }) + if (cssCdnUrlList.length <= 0) return false; + cssCdnUrlList.map((v) => { + let link = document.createElement('link'); + link.rel = 'stylesheet'; + link.href = v; + link.crossOrigin = 'anonymous'; + document.getElementsByTagName('head')[0].appendChild(link); + }); } // 批量设置第三方js export function setJsCdn() { - if (jsCdnUrlList.length <= 0) return false - jsCdnUrlList.map(v => { - let link = document.createElement('script') - link.src = v - document.body.appendChild(link) - }) + if (jsCdnUrlList.length <= 0) return false; + jsCdnUrlList.map((v) => { + let link = document.createElement('script'); + link.src = v; + document.body.appendChild(link); + }); } // 设置执行函数 const setIntroduction = { - cssCdn: () => { - setCssCdn() - }, - jsCdn: () => { - setJsCdn() - } -} + cssCdn: () => { + setCssCdn(); + }, + jsCdn: () => { + setJsCdn(); + }, +}; // 导出函数方法 -export default setIntroduction \ No newline at end of file +export default setIntroduction; diff --git a/src/utils/storage.ts b/src/utils/storage.ts index cb76c811..5d7f1aa0 100644 --- a/src/utils/storage.ts +++ b/src/utils/storage.ts @@ -1,37 +1,37 @@ // 1. localStorage // 设置永久缓存 export function setLocal(key: string, val: any) { - window.localStorage.setItem(key, JSON.stringify(val)) + window.localStorage.setItem(key, JSON.stringify(val)); } // 获取永久缓存 export function getLocal(key: string) { - let json: any = window.localStorage.getItem(key) - return JSON.parse(json) + let json: any = window.localStorage.getItem(key); + return JSON.parse(json); } // 移除永久缓存 export function removeLocal(key: string) { - window.localStorage.removeItem(key) + window.localStorage.removeItem(key); } // 移除全部永久缓存 export function clearLocal() { - window.localStorage.clear() + window.localStorage.clear(); } // 2. sessionStorage // 设置临时缓存 export function setSession(key: string, val: any) { - window.sessionStorage.setItem(key, JSON.stringify(val)) + window.sessionStorage.setItem(key, JSON.stringify(val)); } // 获取临时缓存 export function getSession(key: string) { - let json: any = window.sessionStorage.getItem(key) - return JSON.parse(json) + let json: any = window.sessionStorage.getItem(key); + return JSON.parse(json); } // 移除临时缓存 export function removeSession(key: string) { - window.sessionStorage.removeItem(key) + window.sessionStorage.removeItem(key); } // 移除全部临时缓存 export function clearSession() { - window.sessionStorage.clear() + window.sessionStorage.clear(); } diff --git a/src/utils/theme.ts b/src/utils/theme.ts index b0dd218d..b3fbd865 100644 --- a/src/utils/theme.ts +++ b/src/utils/theme.ts @@ -1,39 +1,39 @@ -import { ElMessage } from 'element-plus' +import { ElMessage } from 'element-plus'; // hex颜色转rgb颜色 export function hexToRgb(str: any) { - let hexs: any = '' - let reg = /^\#?[0-9A-Fa-f]{6}$/ - if (!reg.test(str)) return ElMessage({ type: 'warning', message: "输入错误的hex" }) - str = str.replace("#", "") - hexs = str.match(/../g) - for (let i = 0; i < 3; i++) hexs[i] = parseInt(hexs[i], 16) - return hexs + let hexs: any = ''; + let reg = /^\#?[0-9A-Fa-f]{6}$/; + if (!reg.test(str)) return ElMessage({ type: 'warning', message: '输入错误的hex' }); + str = str.replace('#', ''); + hexs = str.match(/../g); + for (let i = 0; i < 3; i++) hexs[i] = parseInt(hexs[i], 16); + return hexs; } // rgb颜色转Hex颜色 export function rgbToHex(r: any, g: any, b: any) { - let reg = /^\d{1,3}$/ - if (!reg.test(r) || !reg.test(g) || !reg.test(b)) return ElMessage({ type: 'warning', message: "输入错误的rgb颜色值" }) - let hexs = [r.toString(16), g.toString(16), b.toString(16)] - for (let i = 0; i < 3; i++) if (hexs[i].length == 1) hexs[i] = `0${hexs[i]}` - return `#${hexs.join("")}` + let reg = /^\d{1,3}$/; + if (!reg.test(r) || !reg.test(g) || !reg.test(b)) return ElMessage({ type: 'warning', message: '输入错误的rgb颜色值' }); + let hexs = [r.toString(16), g.toString(16), b.toString(16)]; + for (let i = 0; i < 3; i++) if (hexs[i].length == 1) hexs[i] = `0${hexs[i]}`; + return `#${hexs.join('')}`; } // 加深颜色值,level为加深的程度,限0-1之间 export function getDarkColor(color: any, level: number) { - let reg = /^\#?[0-9A-Fa-f]{6}$/ - if (!reg.test(color)) return ElMessage({ type: 'warning', message: "输入错误的hex颜色值" }) - let rgb = hexToRgb(color) - for (let i = 0; i < 3; i++) rgb[i] = Math.floor(rgb[i] * (1 - level)) - return rgbToHex(rgb[0], rgb[1], rgb[2]) + let reg = /^\#?[0-9A-Fa-f]{6}$/; + if (!reg.test(color)) return ElMessage({ type: 'warning', message: '输入错误的hex颜色值' }); + let rgb = hexToRgb(color); + for (let i = 0; i < 3; i++) rgb[i] = Math.floor(rgb[i] * (1 - level)); + return rgbToHex(rgb[0], rgb[1], rgb[2]); } // 变浅颜色值,level为加深的程度,限0-1之间 export function getLightColor(color: any, level: number) { - let reg = /^\#?[0-9A-Fa-f]{6}$/ - if (!reg.test(color)) return ElMessage({ type: 'warning', message: "输入错误的hex颜色值" }) - let rgb = hexToRgb(color) - for (let i = 0; i < 3; i++) rgb[i] = Math.floor((255 - rgb[i]) * level + rgb[i]) - return rgbToHex(rgb[0], rgb[1], rgb[2]) -} \ No newline at end of file + let reg = /^\#?[0-9A-Fa-f]{6}$/; + if (!reg.test(color)) return ElMessage({ type: 'warning', message: '输入错误的hex颜色值' }); + let rgb = hexToRgb(color); + for (let i = 0; i < 3; i++) rgb[i] = Math.floor((255 - rgb[i]) * level + rgb[i]); + return rgbToHex(rgb[0], rgb[1], rgb[2]); +} diff --git a/src/utils/themeConfig.ts b/src/utils/themeConfig.ts deleted file mode 100644 index a1eeea10..00000000 --- a/src/utils/themeConfig.ts +++ /dev/null @@ -1,112 +0,0 @@ -// 布局配置 -export default { - // 是否开启布局配置抽屉 - isDrawer: false, - - /* 全局主题 - ------------------------------- */ - // 默认 primary 颜色,请注意:需要同时修改 `/@/theme/common/var.scss` 对应的值 - primary: "#409eff", - // 默认 success 颜色,请注意:需要同时修改 `/@/theme/common/var.scss` 对应的值 - success: "#67c23a", - // 默认 info 颜色,请注意:需要同时修改 `/@/theme/common/var.scss` 对应的值 - info: "#909399", - // 默认 warning 颜色,请注意:需要同时修改 `/@/theme/common/var.scss` 对应的值 - warning: "#e6a23c", - // 默认 danger 颜色,请注意:需要同时修改 `/@/theme/common/var.scss` 对应的值 - danger: "#f56c6c", - - /* 菜单 / 顶栏 - ------------------------------- */ - // 默认顶栏导航背景颜色,请注意:需要同时修改 `/@/theme/common/var.scss` 对应的值 - topBar: "#ffffff", - // 默认菜单导航背景颜色,请注意:需要同时修改 `/@/theme/common/var.scss` 对应的值 - menuBar: "#545c64", - // 默认分栏菜单背景颜色,请注意:需要同时修改 `/@/theme/common/var.scss` 对应的值 - columnsMenuBar: '#545c64', - // 默认顶栏导航字体颜色,请注意:需要同时修改 `/@/theme/common/var.scss` 对应的值 - topBarColor: "#606266", - // 默认菜单导航字体颜色,请注意:需要同时修改 `/@/theme/common/var.scss` 对应的值 - menuBarColor: "#eaeaea", - // 默认分栏菜单字体颜色,请注意:需要同时修改 `/@/theme/common/var.scss` 对应的值 - columnsMenuBarColor: '#e6e6e6', - // 是否开启顶栏背景颜色渐变 - isTopBarColorGradual: false, - // 是否开启菜单背景颜色渐变 - isMenuBarColorGradual: false, - // 是否开启菜单字体背景高亮 - isMenuBarColorHighlight: false, - // 是否开启菜单字体背景高亮 - - /* 界面设置 - ------------------------------- */ - // 是否开启菜单水平折叠效果 - isCollapse: false, - // 是否开启菜单手风琴效果 - isUniqueOpened: false, - // 是否开启固定 Header - isFixedHeader: false, - // 初始化变量,用于更新菜单 el-scrollbar 的高度,请勿删除 - isFixedHeaderChange: false, - // 是否开启经典布局分割菜单(仅经典布局生效) - isClassicSplitMenu: false, - // 是否开启自动锁屏 - isLockScreen: false, - // 开启自动锁屏倒计时(s/秒) - lockScreenTime: 30, - - /* 界面显示 - ------------------------------- */ - // 是否开启侧边栏 Logo - isShowLogo: false, - // 初始化变量,用于 el-scrollbar 的高度更新,请勿删除 - isShowLogoChange: false, - // 是否开启 Breadcrumb - isBreadcrumb: true, - // 是否开启 Tagsview - isTagsview: true, - // 是否开启 Breadcrumb 图标 - isBreadcrumbIcon: false, - // 是否开启 Tagsview 图标 - isTagsviewIcon: false, - // 是否开启 TagsView 缓存 - isCacheTagsView: false, - // 是否开启 TagsView 拖拽 - isSortableTagsView: true, - // 是否开启 Footer 底部版权信息 - isFooter: false, - // 是否开启灰色模式 - isGrayscale: false, - // 是否开启色弱模式 - isInvert: false, - // 是否开启水印 - isWartermark: false, - // 水印文案 - wartermarkText: 'small@小柒', - - /* 其它设置 - ------------------------------- */ - // 默认 Tagsview 风格,可选 1、 tagsStyleOne 2、 tagsStyleTwo 3、 tagsStyleThree 4、 tagsStyleFour - tagsStyle: 'tagsStyleOne', - // 默认主页面切换动画,可选 1、 slideRight 2、 slideLeft 3、 opacitys - animation: 'slideRight', - // 默认分栏高亮风格,可选 1、 圆角 columnsRound 2、 卡片 columnsCard - columnsAsideStyle: 'columnsRound', - - /* 布局切换 - ------------------------------- */ - // 默认布局,可选 1、默认 defaults 2、经典 classic 3、横向 transverse 4、分栏 columns - layout: 'defaults', - - /* 后端控制路由 - ------------------------------- */ - // 是否开启后端控制路由 - isRequestRoutes: false, - - /* 全局网站标题 / 副标题 - ------------------------------- */ - // 网站主标题(菜单导航、浏览器当前网页标题) - globalTitle: 'vue-next-admin', - // 网站副标题(登录页顶部文字) - globalViceTitle: 'SMALL@小柒' -} \ No newline at end of file diff --git a/src/utils/toolsValidate.js b/src/utils/toolsValidate.js deleted file mode 100644 index ceb57ef5..00000000 --- a/src/utils/toolsValidate.js +++ /dev/null @@ -1,219 +0,0 @@ -/** - * 2020.11.29 lyt 整理 - * 工具类集合,适用于平时开发 - * 后期改成 xx.ts - */ - -// 小数或整数(不可以负数) -export function verifyNumberIntegerAndFloat(val) { - // 匹配空格 - let v = val.replace(/(^\s*)|(\s*$)/g, "") - // 只能是数字和小数点,不能是其他输入 - v = v.replace(/[^\d.]/g, "") - // 以0开始只能输入一个 - v = v.replace(/^0{2}$/g, "0") - // 保证第一位只能是数字,不能是点 - v = v.replace(/^\./g, "") - // 小数只能出现1位 - v = v.replace(".", "$#$").replace(/\./g, "").replace("$#$", ".") - // 小数点后面保留2位 - v = v.replace(/^(\-)*(\d+)\.(\d\d).*$/, '$1$2.$3') - // 返回结果 - return v -} - -// 正整数验证 -export function verifiyNumberInteger(val) { - // 匹配空格 - let v = val.replace(/(^\s*)|(\s*$)/g, "") - // 去掉 '.' , 防止贴贴的时候出现问题 如 0.1.12.12 - v = v.replace(/[\.]*/g, "") - // 去掉以 0 开始后面的数, 防止贴贴的时候出现问题 如 00121323 - v = v.replace(/(^0[\d]*)$/g, "0") - // 首位是0,只能出现一次 - v = v.replace(/^0\d$/g, "0") - // 只匹配数字 - v = v.replace(/[^\d]/g, "") - // 返回结果 - return v -} - -// 去掉中文及空格 -export function verifyCnAndSpace(val) { - // 匹配中文与空格 - let v = val.replace(/[\u4e00-\u9fa5\s]+/g, "") - // 匹配空格 - v = v.replace(/(^\s*)|(\s*$)/g, "") - // 返回结果 - return v -} - -// 去掉英文及空格 -export function verifyEnAndSpace(val) { - // 匹配英文与空格 - let v = val.replace(/[a-zA-Z]+/g, "") - // 匹配空格 - v = v.replace(/(^\s*)|(\s*$)/g, "") - // 返回结果 - return v -} - -// 禁止输入空格 -export function verifyAndSpace(val) { - // 匹配空格 - let v = val.replace(/(^\s*)|(\s*$)/g, "") - // 返回结果 - return v -} - -// 金额用 `,` 区分开 -export function verifyNumberComma(val) { - // 调用小数或整数(不可以负数)方法 - let v = verifyNumberIntegerAndFloat(val) - // 字符串转成数组 - v = v.toString().split(".") - // \B 匹配非单词边界,两边都是单词字符或者两边都是非单词字符 - v[0] = v[0].replace(/\B(?=(\d{3})+(?!\d))/g, ",") - // 数组转字符串 - v = v.join(".") - // 返回结果 - return v -} - -// 匹配文字变色(搜索时) -export function verifyTextColor(val, text = '', color = 'red') { - // 返回内容,添加颜色 - let v = text.replace(new RegExp(val, 'gi'), `${val}`) - // 返回结果 - return v -} - -// 数字转中文大写 -export function verifyNumberCnUppercase(val, unit = '仟佰拾亿仟佰拾万仟佰拾元角分', v = '') { - // 当前内容字符串添加 2个0,为什么?? - val += "00" - // 返回某个指定的字符串值在字符串中首次出现的位置,没有出现,则该方法返回 -1 - let lookup = val.indexOf('.') - // substring:不包含结束下标内容,substr:包含结束下标内容 - if (lookup >= 0) val = val.substring(0, lookup) + val.substr(lookup + 1, 2) - // 根据内容 val 的长度,截取返回对应大写 - unit = unit.substr(unit.length - val.length) - // 循环截取拼接大写 - for (let i = 0; i < val.length; i++) { - v += '零壹贰叁肆伍陆柒捌玖'.substr(val.substr(i, 1), 1) + unit.substr(i, 1) - } - // 正则处理 - v = v.replace(/零角零分$/, '整').replace(/零[仟佰拾]/g, '零').replace(/零{2,}/g, '零').replace(/零([亿|万])/g, '$1').replace(/零+元/, '元').replace(/亿零{0,3}万/, '亿').replace(/^元/, "零元") - // 返回结果 - return v -} - -// 手机号码 -export function verifyPhone(val) { - // false: 手机号码不正确 - if (!/^((12[0-9])|(13[0-9])|(14[5|7])|(15([0-3]|[5-9]))|(18[0,5-9]))\d{8}$/.test(val)) return false - // true: 手机号码正确 - else return true -} - -// 国内电话号码 -export function verifyTelPhone(val) { - // false: 国内电话号码不正确 - if (!/\d{3}-\d{8}|\d{4}-\d{7}/.test(val)) return false - // true: 国内电话号码正确 - else return true -} - -// 登录账号 (字母开头,允许5-16字节,允许字母数字下划线) -export function verifyAccount(val) { - // false: 登录账号不正确 - if (!/^[a-zA-Z][a-zA-Z0-9_]{4,15}$/.test(val)) return false - // true: 登录账号正确 - else return true -} - -// 密码 (以字母开头,长度在6~16之间,只能包含字母、数字和下划线) -export function verifyPassword(val) { - // false: 密码不正确 - if (!/^[a-zA-Z]\w{5,15}$/.test(val)) return false - // true: 密码正确 - else return true -} - -// 强密码 (字母+数字+特殊字符,长度在6-16之间) -export function verifyPasswordPowerful(val) { - // false: 强密码不正确 - if (!/^(?![a-zA-z]+$)(?!\d+$)(?![!@#$%^&\.*]+$)(?![a-zA-z\d]+$)(?![a-zA-z!@#$%^&\.*]+$)(?![\d!@#$%^&\.*]+$)[a-zA-Z\d!@#$%^&\.*]{6,16}$/.test(val)) return false - // true: 强密码正确 - else return true -} - -// 密码强度 -export function verifyPasswordStrength(val) { - let v = '' - // 弱:纯数字,纯字母,纯特殊字符 - if (/^(?:\d+|[a-zA-Z]+|[!@#$%^&\.*]+){6,16}$/.test(val)) v = '弱' - // 中:字母+数字,字母+特殊字符,数字+特殊字符 - if (/^(?![a-zA-z]+$)(?!\d+$)(?![!@#$%^&\.*]+$)[a-zA-Z\d!@#$%^&\.*]{6,16}$/.test(val)) v = '中' - // 强:字母+数字+特殊字符 - if (/^(?![a-zA-z]+$)(?!\d+$)(?![!@#$%^&\.*]+$)(?![a-zA-z\d]+$)(?![a-zA-z!@#$%^&\.*]+$)(?![\d!@#$%^&\.*]+$)[a-zA-Z\d!@#$%^&\.*]{6,16}$/.test(val)) v = '强' - // 返回结果 - return v -} - -// IP地址 -export function verifyIPAddress(val) { - // false: IP地址不正确 - if (!/^(\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])$/.test(val)) return false - // true: IP地址正确 - else return true -} - -// 邮箱 -export function verifyEmail(val) { - // false: 邮箱不正确 - if (!/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(val)) return false - // true: 邮箱正确 - else return true -} - -// 身份证 -export function verifyIdCard(val) { - // false: 身份证不正确 - if (!/^[1-9]\d{5}(18|19|20)\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/.test(val)) return false - // true: 身份证正确 - else return true -} - -// 姓名 -export function verifyFullName(val) { - // false: 姓名不正确 - if (!/^[\u4e00-\u9fa5]{1,6}(·[\u4e00-\u9fa5]{1,6}){0,2}$/.test(val)) return false - // true: 姓名正确 - else return true -} - -// 邮政编码 -export function verifyPostalCode(val) { - // false: 邮政编码不正确 - if (!/^[1-9][0-9]{5}$/.test(val)) return false - // true: 邮政编码正确 - else return true -} - -// url -export function verifyUrl(val) { - // false: url不正确 - if (!/^(?:(?:(?:https?|ftp):)?\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)(?:\.(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)*(?:\.(?:[a-z\u00a1-\uffff]{2,})).?)(?::\d{2,5})?(?:[/?#]\S*)?$/i.test(val)) return false - // true: url正确 - else return true -} - -// 车牌号 -export function verifyCarNum(val) { - // false: 车牌号不正确 - if (!/^(([京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领][A-Z](([0-9]{5}[DF])|([DF]([A-HJ-NP-Z0-9])[0-9]{4})))|([京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领][A-Z][A-HJ-NP-Z0-9]{4}[A-HJ-NP-Z0-9挂学警港澳使领]))$/.test(val)) return false - // true:车牌号正确 - else return true - -} \ No newline at end of file diff --git a/src/utils/toolsValidate.ts b/src/utils/toolsValidate.ts new file mode 100644 index 00000000..9346b4fb --- /dev/null +++ b/src/utils/toolsValidate.ts @@ -0,0 +1,246 @@ +/** + * 2020.11.29 lyt 整理 + * 工具类集合,适用于平时开发 + */ + +// 小数或整数(不可以负数) +export function verifyNumberIntegerAndFloat(val: string) { + // 匹配空格 + let v = val.replace(/(^\s*)|(\s*$)/g, ''); + // 只能是数字和小数点,不能是其他输入 + v = v.replace(/[^\d.]/g, ''); + // 以0开始只能输入一个 + v = v.replace(/^0{2}$/g, '0'); + // 保证第一位只能是数字,不能是点 + v = v.replace(/^\./g, ''); + // 小数只能出现1位 + v = v.replace('.', '$#$').replace(/\./g, '').replace('$#$', '.'); + // 小数点后面保留2位 + v = v.replace(/^(\-)*(\d+)\.(\d\d).*$/, '$1$2.$3'); + // 返回结果 + return v; +} + +// 正整数验证 +export function verifiyNumberInteger(val: string) { + // 匹配空格 + let v = val.replace(/(^\s*)|(\s*$)/g, ''); + // 去掉 '.' , 防止贴贴的时候出现问题 如 0.1.12.12 + v = v.replace(/[\.]*/g, ''); + // 去掉以 0 开始后面的数, 防止贴贴的时候出现问题 如 00121323 + v = v.replace(/(^0[\d]*)$/g, '0'); + // 首位是0,只能出现一次 + v = v.replace(/^0\d$/g, '0'); + // 只匹配数字 + v = v.replace(/[^\d]/g, ''); + // 返回结果 + return v; +} + +// 去掉中文及空格 +export function verifyCnAndSpace(val: string) { + // 匹配中文与空格 + let v = val.replace(/[\u4e00-\u9fa5\s]+/g, ''); + // 匹配空格 + v = v.replace(/(^\s*)|(\s*$)/g, ''); + // 返回结果 + return v; +} + +// 去掉英文及空格 +export function verifyEnAndSpace(val: string) { + // 匹配英文与空格 + let v = val.replace(/[a-zA-Z]+/g, ''); + // 匹配空格 + v = v.replace(/(^\s*)|(\s*$)/g, ''); + // 返回结果 + return v; +} + +// 禁止输入空格 +export function verifyAndSpace(val: string) { + // 匹配空格 + let v = val.replace(/(^\s*)|(\s*$)/g, ''); + // 返回结果 + return v; +} + +// 金额用 `,` 区分开 +export function verifyNumberComma(val: string) { + // 调用小数或整数(不可以负数)方法 + let v: any = verifyNumberIntegerAndFloat(val); + // 字符串转成数组 + v = v.toString().split('.'); + // \B 匹配非单词边界,两边都是单词字符或者两边都是非单词字符 + v[0] = v[0].replace(/\B(?=(\d{3})+(?!\d))/g, ','); + // 数组转字符串 + v = v.join('.'); + // 返回结果 + return v; +} + +// 匹配文字变色(搜索时) +export function verifyTextColor(val: string, text = '', color = 'red') { + // 返回内容,添加颜色 + let v = text.replace(new RegExp(val, 'gi'), `${val}`); + // 返回结果 + return v; +} + +// 数字转中文大写 +export function verifyNumberCnUppercase(val: any, unit = '仟佰拾亿仟佰拾万仟佰拾元角分', v = '') { + // 当前内容字符串添加 2个0,为什么?? + val += '00'; + // 返回某个指定的字符串值在字符串中首次出现的位置,没有出现,则该方法返回 -1 + let lookup = val.indexOf('.'); + // substring:不包含结束下标内容,substr:包含结束下标内容 + if (lookup >= 0) val = val.substring(0, lookup) + val.substr(lookup + 1, 2); + // 根据内容 val 的长度,截取返回对应大写 + unit = unit.substr(unit.length - val.length); + // 循环截取拼接大写 + for (let i = 0; i < val.length; i++) { + v += '零壹贰叁肆伍陆柒捌玖'.substr(val.substr(i, 1), 1) + unit.substr(i, 1); + } + // 正则处理 + v = v + .replace(/零角零分$/, '整') + .replace(/零[仟佰拾]/g, '零') + .replace(/零{2,}/g, '零') + .replace(/零([亿|万])/g, '$1') + .replace(/零+元/, '元') + .replace(/亿零{0,3}万/, '亿') + .replace(/^元/, '零元'); + // 返回结果 + return v; +} + +// 手机号码 +export function verifyPhone(val: string) { + // false: 手机号码不正确 + if (!/^((12[0-9])|(13[0-9])|(14[5|7])|(15([0-3]|[5-9]))|(18[0,5-9]))\d{8}$/.test(val)) return false; + // true: 手机号码正确 + else return true; +} + +// 国内电话号码 +export function verifyTelPhone(val: string) { + // false: 国内电话号码不正确 + if (!/\d{3}-\d{8}|\d{4}-\d{7}/.test(val)) return false; + // true: 国内电话号码正确 + else return true; +} + +// 登录账号 (字母开头,允许5-16字节,允许字母数字下划线) +export function verifyAccount(val: string) { + // false: 登录账号不正确 + if (!/^[a-zA-Z][a-zA-Z0-9_]{4,15}$/.test(val)) return false; + // true: 登录账号正确 + else return true; +} + +// 密码 (以字母开头,长度在6~16之间,只能包含字母、数字和下划线) +export function verifyPassword(val: string) { + // false: 密码不正确 + if (!/^[a-zA-Z]\w{5,15}$/.test(val)) return false; + // true: 密码正确 + else return true; +} + +// 强密码 (字母+数字+特殊字符,长度在6-16之间) +export function verifyPasswordPowerful(val: string) { + // false: 强密码不正确 + if (!/^(?![a-zA-z]+$)(?!\d+$)(?![!@#$%^&\.*]+$)(?![a-zA-z\d]+$)(?![a-zA-z!@#$%^&\.*]+$)(?![\d!@#$%^&\.*]+$)[a-zA-Z\d!@#$%^&\.*]{6,16}$/.test(val)) + return false; + // true: 强密码正确 + else return true; +} + +// 密码强度 +export function verifyPasswordStrength(val: string) { + let v = ''; + // 弱:纯数字,纯字母,纯特殊字符 + if (/^(?:\d+|[a-zA-Z]+|[!@#$%^&\.*]+){6,16}$/.test(val)) v = '弱'; + // 中:字母+数字,字母+特殊字符,数字+特殊字符 + if (/^(?![a-zA-z]+$)(?!\d+$)(?![!@#$%^&\.*]+$)[a-zA-Z\d!@#$%^&\.*]{6,16}$/.test(val)) v = '中'; + // 强:字母+数字+特殊字符 + if (/^(?![a-zA-z]+$)(?!\d+$)(?![!@#$%^&\.*]+$)(?![a-zA-z\d]+$)(?![a-zA-z!@#$%^&\.*]+$)(?![\d!@#$%^&\.*]+$)[a-zA-Z\d!@#$%^&\.*]{6,16}$/.test(val)) + v = '强'; + // 返回结果 + return v; +} + +// IP地址 +export function verifyIPAddress(val: string) { + // false: IP地址不正确 + if ( + !/^(\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])$/.test( + val + ) + ) + return false; + // true: IP地址正确 + else return true; +} + +// 邮箱 +export function verifyEmail(val: string) { + // false: 邮箱不正确 + if ( + !/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test( + val + ) + ) + return false; + // true: 邮箱正确 + else return true; +} + +// 身份证 +export function verifyIdCard(val: string) { + // false: 身份证不正确 + if (!/^[1-9]\d{5}(18|19|20)\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/.test(val)) return false; + // true: 身份证正确 + else return true; +} + +// 姓名 +export function verifyFullName(val: string) { + // false: 姓名不正确 + if (!/^[\u4e00-\u9fa5]{1,6}(·[\u4e00-\u9fa5]{1,6}){0,2}$/.test(val)) return false; + // true: 姓名正确 + else return true; +} + +// 邮政编码 +export function verifyPostalCode(val: string) { + // false: 邮政编码不正确 + if (!/^[1-9][0-9]{5}$/.test(val)) return false; + // true: 邮政编码正确 + else return true; +} + +// url +export function verifyUrl(val: string) { + // false: url不正确 + if ( + !/^(?:(?:(?:https?|ftp):)?\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)(?:\.(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)*(?:\.(?:[a-z\u00a1-\uffff]{2,})).?)(?::\d{2,5})?(?:[/?#]\S*)?$/i.test( + val + ) + ) + return false; + // true: url正确 + else return true; +} + +// 车牌号 +export function verifyCarNum(val: string) { + // false: 车牌号不正确 + if ( + !/^(([京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领][A-Z](([0-9]{5}[DF])|([DF]([A-HJ-NP-Z0-9])[0-9]{4})))|([京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领][A-Z][A-HJ-NP-Z0-9]{4}[A-HJ-NP-Z0-9挂学警港澳使领]))$/.test( + val + ) + ) + return false; + // true:车牌号正确 + else return true; +} diff --git a/src/utils/viteBuild.ts b/src/utils/viteBuild.ts new file mode 100644 index 00000000..05bc8eaa --- /dev/null +++ b/src/utils/viteBuild.ts @@ -0,0 +1,26 @@ +// vite 打包相关 +import dotenv from 'dotenv'; +export interface ViteEnv { + VITE_PORT: number; + VITE_OPEN: boolean; + VITE_PUBLIC_PATH: string; +} + +export function loadEnv(): ViteEnv { + const env = process.env.NODE_ENV; + const ret: any = {}; + const envList = [`.env.${env}.local`, `.env.${env}`, '.env.local', '.env', ,]; + envList.forEach((e) => { + dotenv.config({ path: e }); + }); + for (const envName of Object.keys(process.env)) { + console.log(envName); + let realName = (process.env as any)[envName].replace(/\\n/g, '\n'); + realName = realName === 'true' ? true : realName === 'false' ? false : realName; + if (envName === 'VITE_PORT') realName = Number(realName); + if (envName === 'VITE_OPEN') realName = Boolean(realName); + ret[envName] = realName; + process.env[envName] = realName; + } + return ret; +} diff --git a/src/utils/wartermark.ts b/src/utils/wartermark.ts index 45cf7e67..adde39ca 100644 --- a/src/utils/wartermark.ts +++ b/src/utils/wartermark.ts @@ -1,42 +1,42 @@ // 页面添加水印效果 const setWatermark = (str: any) => { - const id = "1.23452384164.123412416" - if (document.getElementById(id) !== null) document.body.removeChild(document.getElementById(id) as any) - const can = document.createElement("canvas") - can.width = 250 - can.height = 180 - const cans: any = can.getContext("2d") - cans.rotate((-20 * Math.PI) / 180) - cans.font = "12px Vedana" - cans.fillStyle = "rgba(200, 200, 200, 0.30)" - cans.textAlign = "center" - cans.textBaseline = "Middle" - cans.fillText(str, can.width / 10, can.height / 2) - const div = document.createElement("div") - div.id = id - div.style.pointerEvents = "none" - div.style.top = "35px" - div.style.left = "0px" - div.style.position = "fixed" - div.style.zIndex = "10000000" - div.style.width = document.documentElement.clientWidth + "px" - div.style.height = document.documentElement.clientHeight + "px" - div.style.background = `url(${can.toDataURL("image/png")}) left top repeat` - document.body.appendChild(div) - return id + const id = '1.23452384164.123412416'; + if (document.getElementById(id) !== null) document.body.removeChild(document.getElementById(id) as any); + const can = document.createElement('canvas'); + can.width = 250; + can.height = 180; + const cans: any = can.getContext('2d'); + cans.rotate((-20 * Math.PI) / 180); + cans.font = '12px Vedana'; + cans.fillStyle = 'rgba(200, 200, 200, 0.30)'; + cans.textAlign = 'center'; + cans.textBaseline = 'Middle'; + cans.fillText(str, can.width / 10, can.height / 2); + const div = document.createElement('div'); + div.id = id; + div.style.pointerEvents = 'none'; + div.style.top = '35px'; + div.style.left = '0px'; + div.style.position = 'fixed'; + div.style.zIndex = '10000000'; + div.style.width = document.documentElement.clientWidth + 'px'; + div.style.height = document.documentElement.clientHeight + 'px'; + div.style.background = `url(${can.toDataURL('image/png')}) left top repeat`; + document.body.appendChild(div); + return id; }; const watermark = { - // 设置水印 - set: (str: any) => { - let id = setWatermark(str) - if (document.getElementById(id) === null) id = setWatermark(str) - }, - // 删除水印 - del: () => { - let id = '1.23452384164.123412416' - if (document.getElementById(id) !== null) document.body.removeChild(document.getElementById(id) as any) - } -} + // 设置水印 + set: (str: any) => { + let id = setWatermark(str); + if (document.getElementById(id) === null) id = setWatermark(str); + }, + // 删除水印 + del: () => { + let id = '1.23452384164.123412416'; + if (document.getElementById(id) !== null) document.body.removeChild(document.getElementById(id) as any); + }, +}; -export default watermark \ No newline at end of file +export default watermark; diff --git a/src/views/chart/chart.scss b/src/views/chart/chart.scss index 6a6fd9ce..f2b26597 100644 --- a/src/views/chart/chart.scss +++ b/src/views/chart/chart.scss @@ -1,430 +1,428 @@ .chart-scrollbar { - .chart-warp { - display: flex; - flex-direction: column; - height: 100%; - .chart-warp-bottom { - flex: 1; - overflow: hidden; - display: flex; - .big-data-down-left, - .big-data-down-right { - width: 30%; - display: flex; - flex-direction: column; - .flex-warp-item { - padding: 0 7.5px 15px 15px; - width: 100%; - height: 33.33%; - .flex-warp-item-box { - width: 100%; - height: 100%; - background: white; - border: 1px solid #ebeef5; - border-radius: 4px; - display: flex; - flex-direction: column; - padding: 15px; - transition: all ease 0.3s; - &:hover { - box-shadow: 0 2px 12px 0 rgb(0 0 0 / 10%); - transition: all ease 0.3s; - } - .flex-title { - margin-bottom: 15px; - display: flex; - justify-content: space-between; - .flex-title-small { - font-size: 12px; - } - } - .flex-content { - flex: 1; - font-size: 12px; - } - .flex-content-overflow { - overflow: hidden; - } - } - } - } - .big-data-down-left { - color: #303133; - .sky { - display: flex; - align-items: center; - .sky-left { - font-size: 30px; - } - .sky-center { - flex: 1; - overflow: hidden; - padding: 0 10px; - font { - margin-right: 15px; - } - .span { - background: #22bc76; - border-radius: 2px; - padding: 0 5px; - color: white; - } - } - .sky-right { - span { - font-size: 30px; - } - font { - font-size: 20px; - } - } - } - .sky-dd { - .sky-dl { - display: flex; - align-items: center; - height: 28px; - overflow: hidden; - div { - flex: 1; - overflow: hidden; - i { - font-size: 14px; - } - } - .tip { - overflow: hidden; - white-space: nowrap; - text-overflow: ellipsis; - } - } - .sky-dl-first { - color: var(--color-primary); - } - } - .d-states { - display: flex; - .d-states-item { - flex: 1; - display: flex; - align-items: center; - overflow: hidden; - i { - font-size: 20px; - height: 33px; - width: 33px; - line-height: 33px; - text-align: center; - border-radius: 100%; - flex-shrink: 1; - color: #ffffff; - } - .i-bg1 { - background: #22bc76; - } - .i-bg2 { - background: #e2356d; - } - .i-bg3 { - background: #43bbef; - } - .d-states-flex { - overflow: hidden; - padding: 0 10px 0; - .d-states-item-label { - color: var(--color-primary); - overflow: hidden; - white-space: nowrap; - text-overflow: ellipsis; - } - .d-states-item-value { - font-size: 14px; - text-align: center; - margin-top: 3px; - color: var(--color-primary); - } - } - } - } - .d-btn { - margin-top: 5px; - .d-btn-item { - border: 1px solid var(--color-primary); - display: flex; - width: 100%; - border-radius: 35px; - align-items: center; - padding: 5px; - margin-top: 15px; - cursor: pointer; - transition: all ease 0.3s; - color: var(--color-primary); - .d-btn-item-left { - font-size: 20px; - border: 1px solid var(--color-primary); - width: 25px; - height: 25px; - line-height: 25px; - border-radius: 100%; - text-align: center; - font-size: 14px; - } - .d-btn-item-center { - padding: 0 10px; - flex: 1; - } - .d-btn-item-eight { - text-align: right; - padding-right: 10px; - } - } - } - } - .big-data-down-center { - width: 40%; - display: flex; - flex-direction: column; - .big-data-down-center-one { - height: 66.67%; - padding: 0 7.5px 15px; - .big-data-down-center-one-content { - height: 100%; - background: white; - padding: 15px; - border: 1px solid #ebeef5; - border-radius: 4px; - transition: all ease 0.3s; - &:hover { - box-shadow: 0 2px 12px 0 rgb(0 0 0 / 10%); - transition: all ease 0.3s; - } - } - } - .big-data-down-center-two { - padding: 0 7.5px 15px; - height: 33.33%; - .flex-warp-item-box { - width: 100%; - height: 100%; - background: white; - display: flex; - flex-direction: column; - padding: 15px; - border: 1px solid #ebeef5; - border-radius: 4px; - transition: all ease 0.3s; - &:hover { - box-shadow: 0 2px 12px 0 rgb(0 0 0 / 10%); - transition: all ease 0.3s; - } - .flex-title { - margin-bottom: 15px; - color: #303133; - display: flex; - justify-content: space-between; - .flex-title-small { - font-size: 12px; - } - } - .flex-content { - flex: 1; - font-size: 12px; - display: flex; - height: calc(100% - 30px); - .flex-content-left { - display: flex; - flex-wrap: wrap; - width: 120px; - height: 100%; - .monitor-item { - width: 50%; - display: flex; - align-items: center; - .monitor-wave { - cursor: pointer; - width: 40px; - height: 40px; - position: relative; - background-color: var(--color-primary); - border-radius: 50%; - overflow: hidden; - text-align: center; - &::before, - &::after { - content: ''; - position: absolute; - left: 50%; - width: 40px; - height: 40px; - background: #f4f4f4; - animation: roateOne 10s linear infinite; - transform: translateX(-50%); - z-index: 1; - } - &::before { - bottom: 10px; - border-radius: 60%; - } - &::after { - bottom: 8px; - opacity: 0.7; - border-radius: 37%; - } - .monitor-z-index { - position: relative; - z-index: 2; - color: var(--color-primary); - display: flex; - align-items: center; - height: 100%; - justify-content: center; - } - } - @keyframes roateOne { - 0% { - transform: translate(-50%, 0) rotateZ(0deg); - } - 50% { - transform: translate(-50%, -2%) rotateZ(180deg); - } - 100% { - transform: translate(-50%, 0%) rotateZ(360deg); - } - } - .monitor-active { - background-color: #22bc76; - .monitor-z-index { - color: #22bc76; - } - } - } - } - .flex-content-right { - flex: 1; - } - } - } - } - } - .big-data-down-right { - .flex-warp-item { - padding: 0 15px 15px 7.5px; - .flex-content { - display: flex; - flex-direction: column; - .task { - display: flex; - height: 45px; - .task-item { - flex: 1; - color: #ffffff; - display: flex; - justify-content: center; - .task-item-box { - position: relative; - width: 45px; - height: 45px; - overflow: hidden; - border-radius: 100%; - z-index: 0; - display: flex; - align-items: center; - flex-direction: column; - justify-content: center; - box-shadow: 0 10px 12px 0 rgba(0, 0, 0, 0.3); - &::before { - content: ''; - position: absolute; - z-index: -2; - left: -50%; - top: -50%; - width: 200%; - height: 200%; - background-repeat: no-repeat; - background-size: 50% 50%, 50% 50%; - background-position: 0 0, 100% 0, 100% 100%, 0 100%; - background-image: linear-gradient(#19d4ae, #19d4ae), - linear-gradient(#5ab1ef, #5ab1ef), - linear-gradient(#fa6e86, #fa6e86), - linear-gradient(#ffb980, #ffb980); - animation: rotate 2s linear infinite; - } - &::after { - content: ''; - position: absolute; - z-index: -1; - left: 1px; - top: 1px; - width: calc(100% - 2px); - height: calc(100% - 2px); - border-radius: 100%; - } - .task-item-value { - text-align: center; - font-size: 14px; - font-weight: bold; - } - .task-item-label { - text-align: center; - } - } - .task1 { - &::after { - background: #5492be; - } - } - .task2 { - &::after { - background: #43a177; - } - } - .task3 { - &::after { - background: #a76077; - } - } - } - .task-first-item { - flex-direction: column; - text-align: center; - color: var(--color-primary); - .task-first { - font-size: 20px; - } - } - } - .progress { - color: #303133; - display: flex; - flex-direction: column; - flex: 1; - justify-content: space-between; - margin-top: 15px; - .progress-item { - height: 33.33%; - display: flex; - align-items: center; - .progress-box { - flex: 1; - width: 100%; - margin-left: 10px; - ::v-deep(.el-progress__text) { - color: #303133; - font-size: 12px !important; - text-align: right; - } - ::v-deep(.el-progress-bar__outer) { - background-color: rgba(0, 0, 0, 0.1) !important; - } - ::v-deep(.el-progress-bar) { - margin-right: -22px !important; - } - } - } - } - } - } - } - } - } + .chart-warp { + display: flex; + flex-direction: column; + height: 100%; + .chart-warp-bottom { + flex: 1; + overflow: hidden; + display: flex; + .big-data-down-left, + .big-data-down-right { + width: 30%; + display: flex; + flex-direction: column; + .flex-warp-item { + padding: 0 7.5px 15px 15px; + width: 100%; + height: 33.33%; + .flex-warp-item-box { + width: 100%; + height: 100%; + background: white; + border: 1px solid #ebeef5; + border-radius: 4px; + display: flex; + flex-direction: column; + padding: 15px; + transition: all ease 0.3s; + &:hover { + box-shadow: 0 2px 12px 0 rgb(0 0 0 / 10%); + transition: all ease 0.3s; + } + .flex-title { + margin-bottom: 15px; + display: flex; + justify-content: space-between; + .flex-title-small { + font-size: 12px; + } + } + .flex-content { + flex: 1; + font-size: 12px; + } + .flex-content-overflow { + overflow: hidden; + } + } + } + } + .big-data-down-left { + color: #303133; + .sky { + display: flex; + align-items: center; + .sky-left { + font-size: 30px; + } + .sky-center { + flex: 1; + overflow: hidden; + padding: 0 10px; + font { + margin-right: 15px; + } + .span { + background: #22bc76; + border-radius: 2px; + padding: 0 5px; + color: white; + } + } + .sky-right { + span { + font-size: 30px; + } + font { + font-size: 20px; + } + } + } + .sky-dd { + .sky-dl { + display: flex; + align-items: center; + height: 28px; + overflow: hidden; + div { + flex: 1; + overflow: hidden; + i { + font-size: 14px; + } + } + .tip { + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + } + } + .sky-dl-first { + color: var(--color-primary); + } + } + .d-states { + display: flex; + .d-states-item { + flex: 1; + display: flex; + align-items: center; + overflow: hidden; + i { + font-size: 20px; + height: 33px; + width: 33px; + line-height: 33px; + text-align: center; + border-radius: 100%; + flex-shrink: 1; + color: #ffffff; + } + .i-bg1 { + background: #22bc76; + } + .i-bg2 { + background: #e2356d; + } + .i-bg3 { + background: #43bbef; + } + .d-states-flex { + overflow: hidden; + padding: 0 10px 0; + .d-states-item-label { + color: var(--color-primary); + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + } + .d-states-item-value { + font-size: 14px; + text-align: center; + margin-top: 3px; + color: var(--color-primary); + } + } + } + } + .d-btn { + margin-top: 5px; + .d-btn-item { + border: 1px solid var(--color-primary); + display: flex; + width: 100%; + border-radius: 35px; + align-items: center; + padding: 5px; + margin-top: 15px; + cursor: pointer; + transition: all ease 0.3s; + color: var(--color-primary); + .d-btn-item-left { + font-size: 20px; + border: 1px solid var(--color-primary); + width: 25px; + height: 25px; + line-height: 25px; + border-radius: 100%; + text-align: center; + font-size: 14px; + } + .d-btn-item-center { + padding: 0 10px; + flex: 1; + } + .d-btn-item-eight { + text-align: right; + padding-right: 10px; + } + } + } + } + .big-data-down-center { + width: 40%; + display: flex; + flex-direction: column; + .big-data-down-center-one { + height: 66.67%; + padding: 0 7.5px 15px; + .big-data-down-center-one-content { + height: 100%; + background: white; + padding: 15px; + border: 1px solid #ebeef5; + border-radius: 4px; + transition: all ease 0.3s; + &:hover { + box-shadow: 0 2px 12px 0 rgb(0 0 0 / 10%); + transition: all ease 0.3s; + } + } + } + .big-data-down-center-two { + padding: 0 7.5px 15px; + height: 33.33%; + .flex-warp-item-box { + width: 100%; + height: 100%; + background: white; + display: flex; + flex-direction: column; + padding: 15px; + border: 1px solid #ebeef5; + border-radius: 4px; + transition: all ease 0.3s; + &:hover { + box-shadow: 0 2px 12px 0 rgb(0 0 0 / 10%); + transition: all ease 0.3s; + } + .flex-title { + margin-bottom: 15px; + color: #303133; + display: flex; + justify-content: space-between; + .flex-title-small { + font-size: 12px; + } + } + .flex-content { + flex: 1; + font-size: 12px; + display: flex; + height: calc(100% - 30px); + .flex-content-left { + display: flex; + flex-wrap: wrap; + width: 120px; + height: 100%; + .monitor-item { + width: 50%; + display: flex; + align-items: center; + .monitor-wave { + cursor: pointer; + width: 40px; + height: 40px; + position: relative; + background-color: var(--color-primary); + border-radius: 50%; + overflow: hidden; + text-align: center; + &::before, + &::after { + content: ''; + position: absolute; + left: 50%; + width: 40px; + height: 40px; + background: #f4f4f4; + animation: roateOne 10s linear infinite; + transform: translateX(-50%); + z-index: 1; + } + &::before { + bottom: 10px; + border-radius: 60%; + } + &::after { + bottom: 8px; + opacity: 0.7; + border-radius: 37%; + } + .monitor-z-index { + position: relative; + z-index: 2; + color: var(--color-primary); + display: flex; + align-items: center; + height: 100%; + justify-content: center; + } + } + @keyframes roateOne { + 0% { + transform: translate(-50%, 0) rotateZ(0deg); + } + 50% { + transform: translate(-50%, -2%) rotateZ(180deg); + } + 100% { + transform: translate(-50%, 0%) rotateZ(360deg); + } + } + .monitor-active { + background-color: #22bc76; + .monitor-z-index { + color: #22bc76; + } + } + } + } + .flex-content-right { + flex: 1; + } + } + } + } + } + .big-data-down-right { + .flex-warp-item { + padding: 0 15px 15px 7.5px; + .flex-content { + display: flex; + flex-direction: column; + .task { + display: flex; + height: 45px; + .task-item { + flex: 1; + color: #ffffff; + display: flex; + justify-content: center; + .task-item-box { + position: relative; + width: 45px; + height: 45px; + overflow: hidden; + border-radius: 100%; + z-index: 0; + display: flex; + align-items: center; + flex-direction: column; + justify-content: center; + box-shadow: 0 10px 12px 0 rgba(0, 0, 0, 0.3); + &::before { + content: ''; + position: absolute; + z-index: -2; + left: -50%; + top: -50%; + width: 200%; + height: 200%; + background-repeat: no-repeat; + background-size: 50% 50%, 50% 50%; + background-position: 0 0, 100% 0, 100% 100%, 0 100%; + background-image: linear-gradient(#19d4ae, #19d4ae), linear-gradient(#5ab1ef, #5ab1ef), linear-gradient(#fa6e86, #fa6e86), + linear-gradient(#ffb980, #ffb980); + animation: rotate 2s linear infinite; + } + &::after { + content: ''; + position: absolute; + z-index: -1; + left: 1px; + top: 1px; + width: calc(100% - 2px); + height: calc(100% - 2px); + border-radius: 100%; + } + .task-item-value { + text-align: center; + font-size: 14px; + font-weight: bold; + } + .task-item-label { + text-align: center; + } + } + .task1 { + &::after { + background: #5492be; + } + } + .task2 { + &::after { + background: #43a177; + } + } + .task3 { + &::after { + background: #a76077; + } + } + } + .task-first-item { + flex-direction: column; + text-align: center; + color: var(--color-primary); + .task-first { + font-size: 20px; + } + } + } + .progress { + color: #303133; + display: flex; + flex-direction: column; + flex: 1; + justify-content: space-between; + margin-top: 15px; + .progress-item { + height: 33.33%; + display: flex; + align-items: center; + .progress-box { + flex: 1; + width: 100%; + margin-left: 10px; + ::v-deep(.el-progress__text) { + color: #303133; + font-size: 12px !important; + text-align: right; + } + ::v-deep(.el-progress-bar__outer) { + background-color: rgba(0, 0, 0, 0.1) !important; + } + ::v-deep(.el-progress-bar) { + margin-right: -22px !important; + } + } + } + } + } + } + } + } + } } diff --git a/src/views/chart/chart.ts b/src/views/chart/chart.ts index f9b79b78..bc0dda87 100644 --- a/src/views/chart/chart.ts +++ b/src/views/chart/chart.ts @@ -1,78 +1,78 @@ // sky 天气 export const skyList = [ - { - v1: "时间", - v2: "天气", - v3: "温度", - v5: "降水", - v7: "风力", - type: "title", - }, - { - v1: "今天", - v2: "el-icon-cloudy-and-sunny", - v3: "20°/26°", - v5: "50%", - v7: "13m/s", - }, - { - v1: "明天", - v2: "el-icon-lightning", - v3: "20°/26°", - v5: "50%", - v7: "13m/s", - }, + { + v1: '时间', + v2: '天气', + v3: '温度', + v5: '降水', + v7: '风力', + type: 'title', + }, + { + v1: '今天', + v2: 'el-icon-cloudy-and-sunny', + v3: '20°/26°', + v5: '50%', + v7: '13m/s', + }, + { + v1: '明天', + v2: 'el-icon-lightning', + v3: '20°/26°', + v5: '50%', + v7: '13m/s', + }, ]; // 当前设置状态 export const dBtnList = [ - { - v2: "阳光玫瑰种植", - v3: "126天", - v4: "设备在线", - } + { + v2: '阳光玫瑰种植', + v3: '126天', + v4: '设备在线', + }, ]; // 当前设备监测 export const chartData4List = [ - { - label: "温度", - }, - { - label: "光照", - }, - { - label: "湿度", - }, - { - label: "风力", - } + { + label: '温度', + }, + { + label: '光照', + }, + { + label: '湿度', + }, + { + label: '风力', + }, ]; // 3DEarth 地图周围按钮组 export const earth3DBtnList = [ - { - topLevelClass: "fixed-top", - icon: "el-icon-s-marketing", - label: "环境监测", - type: 0, - }, - { - topLevelClass: "fixed-right", - icon: "el-icon-s-cooperation", - label: "精准管理", - type: 1, - }, - { - topLevelClass: "fixed-bottom", - icon: "el-icon-s-order", - label: "数据报表", - type: 2, - }, - { - topLevelClass: "fixed-left", - icon: "el-icon-s-claim", - label: "产品追溯", - type: 3, - }, -]; \ No newline at end of file + { + topLevelClass: 'fixed-top', + icon: 'el-icon-s-marketing', + label: '环境监测', + type: 0, + }, + { + topLevelClass: 'fixed-right', + icon: 'el-icon-s-cooperation', + label: '精准管理', + type: 1, + }, + { + topLevelClass: 'fixed-bottom', + icon: 'el-icon-s-order', + label: '数据报表', + type: 2, + }, + { + topLevelClass: 'fixed-left', + icon: 'el-icon-s-claim', + label: '产品追溯', + type: 3, + }, +]; diff --git a/src/views/chart/head.vue b/src/views/chart/head.vue index fd9bfabc..b8ab1656 100644 --- a/src/views/chart/head.vue +++ b/src/views/chart/head.vue @@ -1,117 +1,106 @@ - \ No newline at end of file + diff --git a/src/views/chart/index.vue b/src/views/chart/index.vue index b389996e..70e7ae61 100644 --- a/src/views/chart/index.vue +++ b/src/views/chart/index.vue @@ -1,477 +1,469 @@ \ No newline at end of file +@import './chart.scss'; + diff --git a/src/views/docs/index.vue b/src/views/docs/index.vue deleted file mode 100644 index b54b1303..00000000 --- a/src/views/docs/index.vue +++ /dev/null @@ -1,3 +0,0 @@ - \ No newline at end of file diff --git a/src/views/error/401.vue b/src/views/error/401.vue index 8d2a41d1..0be725de 100644 --- a/src/views/error/401.vue +++ b/src/views/error/401.vue @@ -1,95 +1,95 @@ \ No newline at end of file + diff --git a/src/views/error/404.vue b/src/views/error/404.vue index d73894a9..2a74ebd2 100644 --- a/src/views/error/404.vue +++ b/src/views/error/404.vue @@ -1,93 +1,93 @@ \ No newline at end of file + diff --git a/src/views/fun/countup/index.vue b/src/views/fun/countup/index.vue index 3c95accb..b88c78dd 100644 --- a/src/views/fun/countup/index.vue +++ b/src/views/fun/countup/index.vue @@ -1,153 +1,156 @@ \ No newline at end of file + diff --git a/src/views/fun/cropper/index.vue b/src/views/fun/cropper/index.vue index 03f6cae3..f6b450cf 100644 --- a/src/views/fun/cropper/index.vue +++ b/src/views/fun/cropper/index.vue @@ -1,54 +1,57 @@ \ No newline at end of file + diff --git a/src/views/fun/echartsMap/index.vue b/src/views/fun/echartsMap/index.vue new file mode 100644 index 00000000..181a717f --- /dev/null +++ b/src/views/fun/echartsMap/index.vue @@ -0,0 +1,130 @@ + + + \ No newline at end of file diff --git a/src/views/fun/echartsMap/mock.ts b/src/views/fun/echartsMap/mock.ts new file mode 100644 index 00000000..dc5b90a5 --- /dev/null +++ b/src/views/fun/echartsMap/mock.ts @@ -0,0 +1,387 @@ +// 地图模拟数据 +export const echartsMapList = [ + { name: '海门', value: 9 }, + { name: '鄂尔多斯', value: 12 }, + { name: '招远', value: 12 }, + { name: '舟山', value: 12 }, + { name: '齐齐哈尔', value: 14 }, + { name: '盐城', value: 15 }, + { name: '赤峰', value: 16 }, + { name: '青岛', value: 18 }, + { name: '乳山', value: 18 }, + { name: '金昌', value: 19 }, + { name: '泉州', value: 21 }, + { name: '莱西', value: 21 }, + { name: '日照', value: 21 }, + { name: '胶南', value: 22 }, + { name: '南通', value: 23 }, + { name: '拉萨', value: 24 }, + { name: '云浮', value: 24 }, + { name: '梅州', value: 25 }, + { name: '文登', value: 25 }, + { name: '上海', value: 25 }, + { name: '攀枝花', value: 25 }, + { name: '威海', value: 25 }, + { name: '承德', value: 25 }, + { name: '厦门', value: 26 }, + { name: '汕尾', value: 26 }, + { name: '潮州', value: 26 }, + { name: '丹东', value: 27 }, + { name: '太仓', value: 27 }, + { name: '曲靖', value: 27 }, + { name: '烟台', value: 28 }, + { name: '福州', value: 29 }, + { name: '瓦房店', value: 30 }, + { name: '即墨', value: 30 }, + { name: '抚顺', value: 31 }, + { name: '玉溪', value: 31 }, + { name: '张家口', value: 31 }, + { name: '阳泉', value: 31 }, + { name: '莱州', value: 32 }, + { name: '湖州', value: 32 }, + { name: '汕头', value: 32 }, + { name: '昆山', value: 33 }, + { name: '宁波', value: 33 }, + { name: '湛江', value: 33 }, + { name: '揭阳', value: 34 }, + { name: '荣成', value: 34 }, + { name: '连云港', value: 35 }, + { name: '葫芦岛', value: 35 }, + { name: '常熟', value: 36 }, + { name: '东莞', value: 36 }, + { name: '河源', value: 36 }, + { name: '淮安', value: 36 }, + { name: '泰州', value: 36 }, + { name: '南宁', value: 37 }, + { name: '营口', value: 37 }, + { name: '惠州', value: 37 }, + { name: '江阴', value: 37 }, + { name: '蓬莱', value: 37 }, + { name: '韶关', value: 38 }, + { name: '嘉峪关', value: 38 }, + { name: '广州', value: 38 }, + { name: '延安', value: 38 }, + { name: '太原', value: 39 }, + { name: '清远', value: 39 }, + { name: '中山', value: 39 }, + { name: '昆明', value: 39 }, + { name: '寿光', value: 40 }, + { name: '盘锦', value: 40 }, + { name: '长治', value: 41 }, + { name: '深圳', value: 360 }, + { name: '珠海', value: 42 }, + { name: '宿迁', value: 43 }, + { name: '咸阳', value: 43 }, + { name: '铜川', value: 44 }, + { name: '平度', value: 44 }, + { name: '佛山', value: 44 }, + { name: '海口', value: 44 }, + { name: '江门', value: 45 }, + { name: '章丘', value: 45 }, + { name: '肇庆', value: 46 }, + { name: '大连', value: 47 }, + { name: '临汾', value: 47 }, + { name: '吴江', value: 47 }, + { name: '石嘴山', value: 49 }, + { name: '沈阳', value: 50 }, + { name: '苏州', value: 50 }, + { name: '茂名', value: 50 }, + { name: '嘉兴', value: 51 }, + { name: '长春', value: 51 }, + { name: '胶州', value: 52 }, + { name: '银川', value: 52 }, + { name: '张家港', value: 52 }, + { name: '三门峡', value: 53 }, + { name: '锦州', value: 54 }, + { name: '南昌', value: 54 }, + { name: '柳州', value: 54 }, + { name: '三亚', value: 54 }, + { name: '自贡', value: 56 }, + { name: '吉林', value: 56 }, + { name: '阳江', value: 57 }, + { name: '泸州', value: 57 }, + { name: '西宁', value: 57 }, + { name: '宜宾', value: 58 }, + { name: '呼和浩特', value: 58 }, + { name: '成都', value: 58 }, + { name: '大同', value: 58 }, + { name: '镇江', value: 59 }, + { name: '桂林', value: 59 }, + { name: '张家界', value: 59 }, + { name: '宜兴', value: 59 }, + { name: '北海', value: 60 }, + { name: '西安', value: 61 }, + { name: '金坛', value: 62 }, + { name: '东营', value: 62 }, + { name: '牡丹江', value: 63 }, + { name: '遵义', value: 63 }, + { name: '绍兴', value: 63 }, + { name: '扬州', value: 64 }, + { name: '常州', value: 64 }, + { name: '潍坊', value: 65 }, + { name: '重庆', value: 66 }, + { name: '台州', value: 67 }, + { name: '南京', value: 67 }, + { name: '滨州', value: 70 }, + { name: '贵阳', value: 71 }, + { name: '无锡', value: 71 }, + { name: '本溪', value: 71 }, + { name: '克拉玛依', value: 72 }, + { name: '渭南', value: 72 }, + { name: '马鞍山', value: 72 }, + { name: '宝鸡', value: 72 }, + { name: '焦作', value: 75 }, + { name: '句容', value: 75 }, + { name: '北京', value: 79 }, + { name: '徐州', value: 79 }, + { name: '衡水', value: 80 }, + { name: '包头', value: 80 }, + { name: '绵阳', value: 80 }, + { name: '乌鲁木齐', value: 84 }, + { name: '枣庄', value: 84 }, + { name: '杭州', value: 84 }, + { name: '淄博', value: 85 }, + { name: '鞍山', value: 86 }, + { name: '溧阳', value: 86 }, + { name: '库尔勒', value: 86 }, + { name: '安阳', value: 90 }, + { name: '开封', value: 90 }, + { name: '济南', value: 92 }, + { name: '德阳', value: 93 }, + { name: '温州', value: 95 }, + { name: '九江', value: 96 }, + { name: '邯郸', value: 98 }, + { name: '临安', value: 99 }, + { name: '兰州', value: 99 }, + { name: '沧州', value: 100 }, + { name: '临沂', value: 103 }, + { name: '南充', value: 104 }, + { name: '天津', value: 105 }, + { name: '富阳', value: 106 }, + { name: '泰安', value: 112 }, + { name: '诸暨', value: 112 }, + { name: '郑州', value: 113 }, + { name: '哈尔滨', value: 114 }, + { name: '聊城', value: 116 }, + { name: '芜湖', value: 117 }, + { name: '唐山', value: 119 }, + { name: '平顶山', value: 119 }, + { name: '邢台', value: 119 }, + { name: '德州', value: 120 }, + { name: '济宁', value: 120 }, + { name: '荆州', value: 127 }, + { name: '宜昌', value: 130 }, + { name: '义乌', value: 132 }, + { name: '丽水', value: 133 }, + { name: '洛阳', value: 134 }, + { name: '秦皇岛', value: 136 }, + { name: '株洲', value: 143 }, + { name: '石家庄', value: 147 }, + { name: '莱芜', value: 148 }, + { name: '常德', value: 152 }, + { name: '保定', value: 153 }, + { name: '湘潭', value: 154 }, + { name: '金华', value: 157 }, + { name: '岳阳', value: 169 }, + { name: '长沙', value: 175 }, + { name: '衢州', value: 177 }, + { name: '廊坊', value: 93 }, + { name: '菏泽', value: 194 }, + { name: '合肥', value: 229 }, + { name: '武汉', value: 273 }, + { name: '大庆', value: 279 } +] + +// 地图经纬度数据 +export const echartsMapData = { + '海门': [121.15, 31.89], + '鄂尔多斯': [109.781327, 39.608266], + '招远': [120.38, 37.35], + '舟山': [122.207216, 29.985295], + '齐齐哈尔': [123.97, 47.33], + '盐城': [120.13, 33.38], + '赤峰': [118.87, 42.28], + '青岛': [120.33, 36.07], + '乳山': [121.52, 36.89], + '金昌': [102.188043, 38.520089], + '泉州': [118.58, 24.93], + '莱西': [120.53, 36.86], + '日照': [119.46, 35.42], + '胶南': [119.97, 35.88], + '南通': [121.05, 32.08], + '拉萨': [91.11, 29.97], + '云浮': [112.02, 22.93], + '梅州': [116.1, 24.55], + '文登': [122.05, 37.2], + '上海': [121.48, 31.22], + '攀枝花': [101.718637, 26.582347], + '威海': [122.1, 37.5], + '承德': [117.93, 40.97], + '厦门': [118.1, 24.46], + '汕尾': [115.375279, 22.786211], + '潮州': [116.63, 23.68], + '丹东': [124.37, 40.13], + '太仓': [121.1, 31.45], + '曲靖': [103.79, 25.51], + '烟台': [121.39, 37.52], + '福州': [119.3, 26.08], + '瓦房店': [121.979603, 39.627114], + '即墨': [120.45, 36.38], + '抚顺': [123.97, 41.97], + '玉溪': [102.52, 24.35], + '张家口': [114.87, 40.82], + '阳泉': [113.57, 37.85], + '莱州': [119.942327, 37.177017], + '湖州': [120.1, 30.86], + '汕头': [116.69, 23.39], + '昆山': [120.95, 31.39], + '宁波': [121.56, 29.86], + '湛江': [110.359377, 21.270708], + '揭阳': [116.35, 23.55], + '荣成': [122.41, 37.16], + '连云港': [119.16, 34.59], + '葫芦岛': [120.836932, 40.711052], + '常熟': [120.74, 31.64], + '东莞': [113.75, 23.04], + '河源': [114.68, 23.73], + '淮安': [119.15, 33.5], + '泰州': [119.9, 32.49], + '南宁': [108.33, 22.84], + '营口': [122.18, 40.65], + '惠州': [114.4, 23.09], + '江阴': [120.26, 31.91], + '蓬莱': [120.75, 37.8], + '韶关': [113.62, 24.84], + '嘉峪关': [98.289152, 39.77313], + '广州': [113.23, 23.16], + '延安': [109.47, 36.6], + '太原': [112.53, 37.87], + '清远': [113.01, 23.7], + '中山': [113.38, 22.52], + '昆明': [102.73, 25.04], + '寿光': [118.73, 36.86], + '盘锦': [122.070714, 41.119997], + '长治': [113.08, 36.18], + '深圳': [114.07, 22.62], + '珠海': [113.52, 22.3], + '宿迁': [118.3, 33.96], + '咸阳': [108.72, 34.36], + '铜川': [109.11, 35.09], + '平度': [119.97, 36.77], + '佛山': [113.11, 23.05], + '海口': [110.35, 20.02], + '江门': [113.06, 22.61], + '章丘': [117.53, 36.72], + '肇庆': [112.44, 23.05], + '大连': [121.62, 38.92], + '临汾': [111.5, 36.08], + '吴江': [120.63, 31.16], + '石嘴山': [106.39, 39.04], + '沈阳': [123.38, 41.8], + '苏州': [120.62, 31.32], + '茂名': [110.88, 21.68], + '嘉兴': [120.76, 30.77], + '长春': [125.35, 43.88], + '胶州': [120.03336, 36.264622], + '银川': [106.27, 38.47], + '张家港': [120.555821, 31.875428], + '三门峡': [111.19, 34.76], + '锦州': [121.15, 41.13], + '南昌': [115.89, 28.68], + '柳州': [109.4, 24.33], + '三亚': [109.511909, 18.252847], + '自贡': [104.778442, 29.33903], + '吉林': [126.57, 43.87], + '阳江': [111.95, 21.85], + '泸州': [105.39, 28.91], + '西宁': [101.74, 36.56], + '宜宾': [104.56, 29.77], + '呼和浩特': [111.65, 40.82], + '成都': [104.06, 30.67], + '大同': [113.3, 40.12], + '镇江': [119.44, 32.2], + '桂林': [110.28, 25.29], + '张家界': [110.479191, 29.117096], + '宜兴': [119.82, 31.36], + '北海': [109.12, 21.49], + '西安': [108.95, 34.27], + '金坛': [119.56, 31.74], + '东营': [118.49, 37.46], + '牡丹江': [129.58, 44.6], + '遵义': [106.9, 27.7], + '绍兴': [120.58, 30.01], + '扬州': [119.42, 32.39], + '常州': [119.95, 31.79], + '潍坊': [119.1, 36.62], + '重庆': [106.54, 29.59], + '台州': [121.420757, 28.656386], + '南京': [118.78, 32.04], + '滨州': [118.03, 37.36], + '贵阳': [106.71, 26.57], + '无锡': [120.29, 31.59], + '本溪': [123.73, 41.3], + '克拉玛依': [84.77, 45.59], + '渭南': [109.5, 34.52], + '马鞍山': [118.48, 31.56], + '宝鸡': [107.15, 34.38], + '焦作': [113.21, 35.24], + '句容': [119.16, 31.95], + '北京': [116.46, 39.92], + '徐州': [117.2, 34.26], + '衡水': [115.72, 37.72], + '包头': [110, 40.58], + '绵阳': [104.73, 31.48], + '乌鲁木齐': [87.68, 43.77], + '枣庄': [117.57, 34.86], + '杭州': [120.19, 30.26], + '淄博': [118.05, 36.78], + '鞍山': [122.85, 41.12], + '溧阳': [119.48, 31.43], + '库尔勒': [86.06, 41.68], + '安阳': [114.35, 36.1], + '开封': [114.35, 34.79], + '济南': [117, 36.65], + '德阳': [104.37, 31.13], + '温州': [120.65, 28.01], + '九江': [115.97, 29.71], + '邯郸': [114.47, 36.6], + '临安': [119.72, 30.23], + '兰州': [103.73, 36.03], + '沧州': [116.83, 38.33], + '临沂': [118.35, 35.05], + '南充': [106.110698, 30.837793], + '天津': [117.2, 39.13], + '富阳': [119.95, 30.07], + '泰安': [117.13, 36.18], + '诸暨': [120.23, 29.71], + '郑州': [113.65, 34.76], + '哈尔滨': [126.63, 45.75], + '聊城': [115.97, 36.45], + '芜湖': [118.38, 31.33], + '唐山': [118.02, 39.63], + '平顶山': [113.29, 33.75], + '邢台': [114.48, 37.05], + '德州': [116.29, 37.45], + '济宁': [116.59, 35.38], + '荆州': [112.239741, 30.335165], + '宜昌': [111.3, 30.7], + '义乌': [120.06, 29.32], + '丽水': [119.92, 28.45], + '洛阳': [112.44, 34.7], + '秦皇岛': [119.57, 39.95], + '株洲': [113.16, 27.83], + '石家庄': [114.48, 38.03], + '莱芜': [117.67, 36.19], + '常德': [111.69, 29.05], + '保定': [115.48, 38.85], + '湘潭': [112.91, 27.87], + '金华': [119.64, 29.12], + '岳阳': [113.09, 29.37], + '长沙': [113, 28.21], + '衢州': [118.88, 28.97], + '廊坊': [116.7, 39.53], + '菏泽': [115.480656, 35.23375], + '合肥': [117.27, 31.86], + '武汉': [114.31, 30.52], + '大庆': [125.03, 46.58] +} \ No newline at end of file diff --git a/src/views/fun/mindMap/index.vue b/src/views/fun/mindMap/index.vue index 62a72370..19f73a0e 100644 --- a/src/views/fun/mindMap/index.vue +++ b/src/views/fun/mindMap/index.vue @@ -1,563 +1,527 @@ \ No newline at end of file + diff --git a/src/views/fun/qrcode/index.vue b/src/views/fun/qrcode/index.vue index da2b4dbd..e07a2a4d 100644 --- a/src/views/fun/qrcode/index.vue +++ b/src/views/fun/qrcode/index.vue @@ -1,67 +1,73 @@ \ No newline at end of file + diff --git a/src/views/fun/selector/index.vue b/src/views/fun/selector/index.vue index 7293fc47..690a3b4e 100644 --- a/src/views/fun/selector/index.vue +++ b/src/views/fun/selector/index.vue @@ -1,30 +1,30 @@ \ No newline at end of file + diff --git a/src/views/fun/tagsView/index.vue b/src/views/fun/tagsView/index.vue index 6ec731b9..4e1fe9f3 100644 --- a/src/views/fun/tagsView/index.vue +++ b/src/views/fun/tagsView/index.vue @@ -1,153 +1,148 @@ \ No newline at end of file + diff --git a/src/views/fun/tree/index.vue b/src/views/fun/tree/index.vue index 0803a394..33ea7f03 100644 --- a/src/views/fun/tree/index.vue +++ b/src/views/fun/tree/index.vue @@ -1,85 +1,86 @@ \ No newline at end of file + diff --git a/src/views/fun/tree/mock.ts b/src/views/fun/tree/mock.ts index a8fe3087..aa323568 100644 --- a/src/views/fun/tree/mock.ts +++ b/src/views/fun/tree/mock.ts @@ -1,381 +1,377 @@ // 模拟数据 export const echartsTreeList = { - "name": "flare", - "children": [ - { - "name": "analytics", - "children": [ - { - "name": "cluster", - "children": [ - { "name": "AgglomerativeCluster", "value": 3938 }, - { "name": "CommunityStructure", "value": 3812 }, - { "name": "HierarchicalCluster", "value": 6714 }, - { "name": "MergeEdge", "value": 743 } - ] - }, - { - "name": "graph", - "children": [ - { "name": "BetweennessCentrality", "value": 3534 }, - { "name": "LinkDistance", "value": 5731 }, - { "name": "MaxFlowMinCut", "value": 7840 }, - { "name": "ShortestPaths", "value": 5914 }, - { "name": "SpanningTree", "value": 3416 } - ] - }, - { - "name": "optimization", - "children": [ - { "name": "AspectRatioBanker", "value": 7074 } - ] - } - ] - }, - { - "name": "animate", - "children": [ - { "name": "Easing", "value": 17010 }, - { "name": "FunctionSequence", "value": 5842 }, - { - "name": "interpolate", - "children": [ - { "name": "ArrayInterpolator", "value": 1983 }, - { "name": "ColorInterpolator", "value": 2047 }, - { "name": "DateInterpolator", "value": 1375 }, - { "name": "Interpolator", "value": 8746 }, - { "name": "MatrixInterpolator", "value": 2202 }, - { "name": "NumberInterpolator", "value": 1382 }, - { "name": "ObjectInterpolator", "value": 1629 }, - { "name": "PointInterpolator", "value": 1675 }, - { "name": "RectangleInterpolator", "value": 2042 } - ] - }, - { "name": "ISchedulable", "value": 1041 }, - { "name": "Parallel", "value": 5176 }, - { "name": "Pause", "value": 449 }, - { "name": "Scheduler", "value": 5593 }, - { "name": "Sequence", "value": 5534 }, - { "name": "Transition", "value": 9201 }, - { "name": "Transitioner", "value": 19975 }, - { "name": "TransitionEvent", "value": 1116 }, - { "name": "Tween", "value": 6006 } - ] - }, - { - "name": "data", - "children": [ - { - "name": "converters", - "children": [ - { "name": "Converters", "value": 721 }, - { "name": "DelimitedTextConverter", "value": 4294 }, - { "name": "GraphMLConverter", "value": 9800 }, - { "name": "IDataConverter", "value": 1314 }, - { "name": "JSONConverter", "value": 2220 } - ] - }, - { "name": "DataField", "value": 1759 }, - { "name": "DataSchema", "value": 2165 }, - { "name": "DataSet", "value": 586 }, - { "name": "DataSource", "value": 3331 }, - { "name": "DataTable", "value": 772 }, - { "name": "DataUtil", "value": 3322 } - ] - }, - { - "name": "display", - "children": [ - { "name": "DirtySprite", "value": 8833 }, - { "name": "LineSprite", "value": 1732 }, - { "name": "RectSprite", "value": 3623 }, - { "name": "TextSprite", "value": 10066 } - ] - }, - { - "name": "flex", - "children": [ - { "name": "FlareVis", "value": 4116 } - ] - }, - { - "name": "physics", - "children": [ - { "name": "DragForce", "value": 1082 }, - { "name": "GravityForce", "value": 1336 }, - { "name": "IForce", "value": 319 }, - { "name": "NBodyForce", "value": 10498 }, - { "name": "Particle", "value": 2822 }, - { "name": "Simulation", "value": 9983 }, - { "name": "Spring", "value": 2213 }, - { "name": "SpringForce", "value": 1681 } - ] - }, - { - "name": "query", - "children": [ - { "name": "AggregateExpression", "value": 1616 }, - { "name": "And", "value": 1027 }, - { "name": "Arithmetic", "value": 3891 }, - { "name": "Average", "value": 891 }, - { "name": "BinaryExpression", "value": 2893 }, - { "name": "Comparison", "value": 5103 }, - { "name": "CompositeExpression", "value": 3677 }, - { "name": "Count", "value": 781 }, - { "name": "DateUtil", "value": 4141 }, - { "name": "Distinct", "value": 933 }, - { "name": "Expression", "value": 5130 }, - { "name": "ExpressionIterator", "value": 3617 }, - { "name": "Fn", "value": 3240 }, - { "name": "If", "value": 2732 }, - { "name": "IsA", "value": 2039 }, - { "name": "Literal", "value": 1214 }, - { "name": "Match", "value": 3748 }, - { "name": "Maximum", "value": 843 }, - { - "name": "methods", - "children": [ - { "name": "add", "value": 593 }, - { "name": "and", "value": 330 }, - { "name": "average", "value": 287 }, - { "name": "count", "value": 277 }, - { "name": "distinct", "value": 292 }, - { "name": "div", "value": 595 }, - { "name": "eq", "value": 594 }, - { "name": "fn", "value": 460 }, - { "name": "gt", "value": 603 }, - { "name": "gte", "value": 625 }, - { "name": "iff", "value": 748 }, - { "name": "isa", "value": 461 }, - { "name": "lt", "value": 597 }, - { "name": "lte", "value": 619 }, - { "name": "max", "value": 283 }, - { "name": "min", "value": 283 }, - { "name": "mod", "value": 591 }, - { "name": "mul", "value": 603 }, - { "name": "neq", "value": 599 }, - { "name": "not", "value": 386 }, - { "name": "or", "value": 323 }, - { "name": "orderby", "value": 307 }, - { "name": "range", "value": 772 }, - { "name": "select", "value": 296 }, - { "name": "stddev", "value": 363 }, - { "name": "sub", "value": 600 }, - { "name": "sum", "value": 280 }, - { "name": "update", "value": 307 }, - { "name": "variance", "value": 335 }, - { "name": "where", "value": 299 }, - { "name": "xor", "value": 354 }, - { "name": "-", "value": 264 } - ] - }, - { "name": "Minimum", "value": 843 }, - { "name": "Not", "value": 1554 }, - { "name": "Or", "value": 970 }, - { "name": "Query", "value": 13896 }, - { "name": "Range", "value": 1594 }, - { "name": "StringUtil", "value": 4130 }, - { "name": "Sum", "value": 791 }, - { "name": "Variable", "value": 1124 }, - { "name": "Variance", "value": 1876 }, - { "name": "Xor", "value": 1101 } - ] - }, - { - "name": "scale", - "children": [ - { "name": "IScaleMap", "value": 2105 }, - { "name": "LinearScale", "value": 1316 }, - { "name": "LogScale", "value": 3151 }, - { "name": "OrdinalScale", "value": 3770 }, - { "name": "QuantileScale", "value": 2435 }, - { "name": "QuantitativeScale", "value": 4839 }, - { "name": "RootScale", "value": 1756 }, - { "name": "Scale", "value": 4268 }, - { "name": "ScaleType", "value": 1821 }, - { "name": "TimeScale", "value": 5833 } - ] - }, - { - "name": "util", - "children": [ - { "name": "Arrays", "value": 8258 }, - { "name": "Colors", "value": 10001 }, - { "name": "Dates", "value": 8217 }, - { "name": "Displays", "value": 12555 }, - { "name": "Filter", "value": 2324 }, - { "name": "Geometry", "value": 10993 }, - { - "name": "heap", - "children": [ - { "name": "FibonacciHeap", "value": 9354 }, - { "name": "HeapNode", "value": 1233 } - ] - }, - { "name": "IEvaluable", "value": 335 }, - { "name": "IPredicate", "value": 383 }, - { "name": "IValueProxy", "value": 874 }, - { - "name": "math", - "children": [ - { "name": "DenseMatrix", "value": 3165 }, - { "name": "IMatrix", "value": 2815 }, - { "name": "SparseMatrix", "value": 3366 } - ] - }, - { "name": "Maths", "value": 17705 }, - { "name": "Orientation", "value": 1486 }, - { - "name": "palette", - "children": [ - { "name": "ColorPalette", "value": 6367 }, - { "name": "Palette", "value": 1229 }, - { "name": "ShapePalette", "value": 2059 }, - { "name": "SizePalette", "value": 2291 } - ] - }, - { "name": "Property", "value": 5559 }, - { "name": "Shapes", "value": 19118 }, - { "name": "Sort", "value": 6887 }, - { "name": "Stats", "value": 6557 }, - { "name": "Strings", "value": 22026 } - ] - }, - { - "name": "vis", - "children": [ - { - "name": "axis", - "children": [ - { "name": "Axes", "value": 1302 }, - { "name": "Axis", "value": 24593 }, - { "name": "AxisGridLine", "value": 652 }, - { "name": "AxisLabel", "value": 636 }, - { "name": "CartesianAxes", "value": 6703 } - ] - }, - { - "name": "controls", - "children": [ - { "name": "AnchorControl", "value": 2138 }, - { "name": "ClickControl", "value": 3824 }, - { "name": "Control", "value": 1353 }, - { "name": "ControlList", "value": 4665 }, - { "name": "DragControl", "value": 2649 }, - { "name": "ExpandControl", "value": 2832 }, - { "name": "HoverControl", "value": 4896 }, - { "name": "IControl", "value": 763 }, - { "name": "PanZoomControl", "value": 5222 }, - { "name": "SelectionControl", "value": 7862 }, - { "name": "TooltipControl", "value": 8435 } - ] - }, - { - "name": "data", - "children": [ - { "name": "Data", "value": 20544 }, - { "name": "DataList", "value": 19788 }, - { "name": "DataSprite", "value": 10349 }, - { "name": "EdgeSprite", "value": 3301 }, - { "name": "NodeSprite", "value": 19382 }, - { - "name": "render", - "children": [ - { "name": "ArrowType", "value": 698 }, - { "name": "EdgeRenderer", "value": 5569 }, - { "name": "IRenderer", "value": 353 }, - { "name": "ShapeRenderer", "value": 2247 } - ] - }, - { "name": "ScaleBinding", "value": 11275 }, - { "name": "Tree", "value": 7147 }, - { "name": "TreeBuilder", "value": 9930 } - ] - }, - { - "name": "events", - "children": [ - { "name": "DataEvent", "value": 2313 }, - { "name": "SelectionEvent", "value": 1880 }, - { "name": "TooltipEvent", "value": 1701 }, - { "name": "VisualizationEvent", "value": 1117 } - ] - }, - { - "name": "legend", - "children": [ - { "name": "Legend", "value": 20859 }, - { "name": "LegendItem", "value": 4614 }, - { "name": "LegendRange", "value": 10530 } - ] - }, - { - "name": "operator", - "children": [ - { - "name": "distortion", - "children": [ - { "name": "BifocalDistortion", "value": 4461 }, - { "name": "Distortion", "value": 6314 }, - { "name": "FisheyeDistortion", "value": 3444 } - ] - }, - { - "name": "encoder", - "children": [ - { "name": "ColorEncoder", "value": 3179 }, - { "name": "Encoder", "value": 4060 }, - { "name": "PropertyEncoder", "value": 4138 }, - { "name": "ShapeEncoder", "value": 1690 }, - { "name": "SizeEncoder", "value": 1830 } - ] - }, - { - "name": "filter", - "children": [ - { "name": "FisheyeTreeFilter", "value": 5219 }, - { "name": "GraphDistanceFilter", "value": 3165 }, - { "name": "VisibilityFilter", "value": 3509 } - ] - }, - { "name": "IOperator", "value": 1286 }, - { - "name": "label", - "children": [ - { "name": "Labeler", "value": 9956 }, - { "name": "RadialLabeler", "value": 3899 }, - { "name": "StackedAreaLabeler", "value": 3202 } - ] - }, - { - "name": "layout", - "children": [ - { "name": "AxisLayout", "value": 6725 }, - { "name": "BundledEdgeRouter", "value": 3727 }, - { "name": "CircleLayout", "value": 9317 }, - { "name": "CirclePackingLayout", "value": 12003 }, - { "name": "DendrogramLayout", "value": 4853 }, - { "name": "ForceDirectedLayout", "value": 8411 }, - { "name": "IcicleTreeLayout", "value": 4864 }, - { "name": "IndentedTreeLayout", "value": 3174 }, - { "name": "Layout", "value": 7881 }, - { "name": "NodeLinkTreeLayout", "value": 12870 }, - { "name": "PieLayout", "value": 2728 }, - { "name": "RadialTreeLayout", "value": 12348 }, - { "name": "RandomLayout", "value": 870 }, - { "name": "StackedAreaLayout", "value": 9121 }, - { "name": "TreeMapLayout", "value": 9191 } - ] - }, - { "name": "Operator", "value": 2490 }, - { "name": "OperatorList", "value": 5248 }, - { "name": "OperatorSequence", "value": 4190 }, - { "name": "OperatorSwitch", "value": 2581 }, - { "name": "SortOperator", "value": 2023 } - ] - }, - { "name": "Visualization", "value": 16540 } - ] - } - ] -} \ No newline at end of file + name: 'flare', + children: [ + { + name: 'analytics', + children: [ + { + name: 'cluster', + children: [ + { name: 'AgglomerativeCluster', value: 3938 }, + { name: 'CommunityStructure', value: 3812 }, + { name: 'HierarchicalCluster', value: 6714 }, + { name: 'MergeEdge', value: 743 }, + ], + }, + { + name: 'graph', + children: [ + { name: 'BetweennessCentrality', value: 3534 }, + { name: 'LinkDistance', value: 5731 }, + { name: 'MaxFlowMinCut', value: 7840 }, + { name: 'ShortestPaths', value: 5914 }, + { name: 'SpanningTree', value: 3416 }, + ], + }, + { + name: 'optimization', + children: [{ name: 'AspectRatioBanker', value: 7074 }], + }, + ], + }, + { + name: 'animate', + children: [ + { name: 'Easing', value: 17010 }, + { name: 'FunctionSequence', value: 5842 }, + { + name: 'interpolate', + children: [ + { name: 'ArrayInterpolator', value: 1983 }, + { name: 'ColorInterpolator', value: 2047 }, + { name: 'DateInterpolator', value: 1375 }, + { name: 'Interpolator', value: 8746 }, + { name: 'MatrixInterpolator', value: 2202 }, + { name: 'NumberInterpolator', value: 1382 }, + { name: 'ObjectInterpolator', value: 1629 }, + { name: 'PointInterpolator', value: 1675 }, + { name: 'RectangleInterpolator', value: 2042 }, + ], + }, + { name: 'ISchedulable', value: 1041 }, + { name: 'Parallel', value: 5176 }, + { name: 'Pause', value: 449 }, + { name: 'Scheduler', value: 5593 }, + { name: 'Sequence', value: 5534 }, + { name: 'Transition', value: 9201 }, + { name: 'Transitioner', value: 19975 }, + { name: 'TransitionEvent', value: 1116 }, + { name: 'Tween', value: 6006 }, + ], + }, + { + name: 'data', + children: [ + { + name: 'converters', + children: [ + { name: 'Converters', value: 721 }, + { name: 'DelimitedTextConverter', value: 4294 }, + { name: 'GraphMLConverter', value: 9800 }, + { name: 'IDataConverter', value: 1314 }, + { name: 'JSONConverter', value: 2220 }, + ], + }, + { name: 'DataField', value: 1759 }, + { name: 'DataSchema', value: 2165 }, + { name: 'DataSet', value: 586 }, + { name: 'DataSource', value: 3331 }, + { name: 'DataTable', value: 772 }, + { name: 'DataUtil', value: 3322 }, + ], + }, + { + name: 'display', + children: [ + { name: 'DirtySprite', value: 8833 }, + { name: 'LineSprite', value: 1732 }, + { name: 'RectSprite', value: 3623 }, + { name: 'TextSprite', value: 10066 }, + ], + }, + { + name: 'flex', + children: [{ name: 'FlareVis', value: 4116 }], + }, + { + name: 'physics', + children: [ + { name: 'DragForce', value: 1082 }, + { name: 'GravityForce', value: 1336 }, + { name: 'IForce', value: 319 }, + { name: 'NBodyForce', value: 10498 }, + { name: 'Particle', value: 2822 }, + { name: 'Simulation', value: 9983 }, + { name: 'Spring', value: 2213 }, + { name: 'SpringForce', value: 1681 }, + ], + }, + { + name: 'query', + children: [ + { name: 'AggregateExpression', value: 1616 }, + { name: 'And', value: 1027 }, + { name: 'Arithmetic', value: 3891 }, + { name: 'Average', value: 891 }, + { name: 'BinaryExpression', value: 2893 }, + { name: 'Comparison', value: 5103 }, + { name: 'CompositeExpression', value: 3677 }, + { name: 'Count', value: 781 }, + { name: 'DateUtil', value: 4141 }, + { name: 'Distinct', value: 933 }, + { name: 'Expression', value: 5130 }, + { name: 'ExpressionIterator', value: 3617 }, + { name: 'Fn', value: 3240 }, + { name: 'If', value: 2732 }, + { name: 'IsA', value: 2039 }, + { name: 'Literal', value: 1214 }, + { name: 'Match', value: 3748 }, + { name: 'Maximum', value: 843 }, + { + name: 'methods', + children: [ + { name: 'add', value: 593 }, + { name: 'and', value: 330 }, + { name: 'average', value: 287 }, + { name: 'count', value: 277 }, + { name: 'distinct', value: 292 }, + { name: 'div', value: 595 }, + { name: 'eq', value: 594 }, + { name: 'fn', value: 460 }, + { name: 'gt', value: 603 }, + { name: 'gte', value: 625 }, + { name: 'iff', value: 748 }, + { name: 'isa', value: 461 }, + { name: 'lt', value: 597 }, + { name: 'lte', value: 619 }, + { name: 'max', value: 283 }, + { name: 'min', value: 283 }, + { name: 'mod', value: 591 }, + { name: 'mul', value: 603 }, + { name: 'neq', value: 599 }, + { name: 'not', value: 386 }, + { name: 'or', value: 323 }, + { name: 'orderby', value: 307 }, + { name: 'range', value: 772 }, + { name: 'select', value: 296 }, + { name: 'stddev', value: 363 }, + { name: 'sub', value: 600 }, + { name: 'sum', value: 280 }, + { name: 'update', value: 307 }, + { name: 'variance', value: 335 }, + { name: 'where', value: 299 }, + { name: 'xor', value: 354 }, + { name: '-', value: 264 }, + ], + }, + { name: 'Minimum', value: 843 }, + { name: 'Not', value: 1554 }, + { name: 'Or', value: 970 }, + { name: 'Query', value: 13896 }, + { name: 'Range', value: 1594 }, + { name: 'StringUtil', value: 4130 }, + { name: 'Sum', value: 791 }, + { name: 'Variable', value: 1124 }, + { name: 'Variance', value: 1876 }, + { name: 'Xor', value: 1101 }, + ], + }, + { + name: 'scale', + children: [ + { name: 'IScaleMap', value: 2105 }, + { name: 'LinearScale', value: 1316 }, + { name: 'LogScale', value: 3151 }, + { name: 'OrdinalScale', value: 3770 }, + { name: 'QuantileScale', value: 2435 }, + { name: 'QuantitativeScale', value: 4839 }, + { name: 'RootScale', value: 1756 }, + { name: 'Scale', value: 4268 }, + { name: 'ScaleType', value: 1821 }, + { name: 'TimeScale', value: 5833 }, + ], + }, + { + name: 'util', + children: [ + { name: 'Arrays', value: 8258 }, + { name: 'Colors', value: 10001 }, + { name: 'Dates', value: 8217 }, + { name: 'Displays', value: 12555 }, + { name: 'Filter', value: 2324 }, + { name: 'Geometry', value: 10993 }, + { + name: 'heap', + children: [ + { name: 'FibonacciHeap', value: 9354 }, + { name: 'HeapNode', value: 1233 }, + ], + }, + { name: 'IEvaluable', value: 335 }, + { name: 'IPredicate', value: 383 }, + { name: 'IValueProxy', value: 874 }, + { + name: 'math', + children: [ + { name: 'DenseMatrix', value: 3165 }, + { name: 'IMatrix', value: 2815 }, + { name: 'SparseMatrix', value: 3366 }, + ], + }, + { name: 'Maths', value: 17705 }, + { name: 'Orientation', value: 1486 }, + { + name: 'palette', + children: [ + { name: 'ColorPalette', value: 6367 }, + { name: 'Palette', value: 1229 }, + { name: 'ShapePalette', value: 2059 }, + { name: 'SizePalette', value: 2291 }, + ], + }, + { name: 'Property', value: 5559 }, + { name: 'Shapes', value: 19118 }, + { name: 'Sort', value: 6887 }, + { name: 'Stats', value: 6557 }, + { name: 'Strings', value: 22026 }, + ], + }, + { + name: 'vis', + children: [ + { + name: 'axis', + children: [ + { name: 'Axes', value: 1302 }, + { name: 'Axis', value: 24593 }, + { name: 'AxisGridLine', value: 652 }, + { name: 'AxisLabel', value: 636 }, + { name: 'CartesianAxes', value: 6703 }, + ], + }, + { + name: 'controls', + children: [ + { name: 'AnchorControl', value: 2138 }, + { name: 'ClickControl', value: 3824 }, + { name: 'Control', value: 1353 }, + { name: 'ControlList', value: 4665 }, + { name: 'DragControl', value: 2649 }, + { name: 'ExpandControl', value: 2832 }, + { name: 'HoverControl', value: 4896 }, + { name: 'IControl', value: 763 }, + { name: 'PanZoomControl', value: 5222 }, + { name: 'SelectionControl', value: 7862 }, + { name: 'TooltipControl', value: 8435 }, + ], + }, + { + name: 'data', + children: [ + { name: 'Data', value: 20544 }, + { name: 'DataList', value: 19788 }, + { name: 'DataSprite', value: 10349 }, + { name: 'EdgeSprite', value: 3301 }, + { name: 'NodeSprite', value: 19382 }, + { + name: 'render', + children: [ + { name: 'ArrowType', value: 698 }, + { name: 'EdgeRenderer', value: 5569 }, + { name: 'IRenderer', value: 353 }, + { name: 'ShapeRenderer', value: 2247 }, + ], + }, + { name: 'ScaleBinding', value: 11275 }, + { name: 'Tree', value: 7147 }, + { name: 'TreeBuilder', value: 9930 }, + ], + }, + { + name: 'events', + children: [ + { name: 'DataEvent', value: 2313 }, + { name: 'SelectionEvent', value: 1880 }, + { name: 'TooltipEvent', value: 1701 }, + { name: 'VisualizationEvent', value: 1117 }, + ], + }, + { + name: 'legend', + children: [ + { name: 'Legend', value: 20859 }, + { name: 'LegendItem', value: 4614 }, + { name: 'LegendRange', value: 10530 }, + ], + }, + { + name: 'operator', + children: [ + { + name: 'distortion', + children: [ + { name: 'BifocalDistortion', value: 4461 }, + { name: 'Distortion', value: 6314 }, + { name: 'FisheyeDistortion', value: 3444 }, + ], + }, + { + name: 'encoder', + children: [ + { name: 'ColorEncoder', value: 3179 }, + { name: 'Encoder', value: 4060 }, + { name: 'PropertyEncoder', value: 4138 }, + { name: 'ShapeEncoder', value: 1690 }, + { name: 'SizeEncoder', value: 1830 }, + ], + }, + { + name: 'filter', + children: [ + { name: 'FisheyeTreeFilter', value: 5219 }, + { name: 'GraphDistanceFilter', value: 3165 }, + { name: 'VisibilityFilter', value: 3509 }, + ], + }, + { name: 'IOperator', value: 1286 }, + { + name: 'label', + children: [ + { name: 'Labeler', value: 9956 }, + { name: 'RadialLabeler', value: 3899 }, + { name: 'StackedAreaLabeler', value: 3202 }, + ], + }, + { + name: 'layout', + children: [ + { name: 'AxisLayout', value: 6725 }, + { name: 'BundledEdgeRouter', value: 3727 }, + { name: 'CircleLayout', value: 9317 }, + { name: 'CirclePackingLayout', value: 12003 }, + { name: 'DendrogramLayout', value: 4853 }, + { name: 'ForceDirectedLayout', value: 8411 }, + { name: 'IcicleTreeLayout', value: 4864 }, + { name: 'IndentedTreeLayout', value: 3174 }, + { name: 'Layout', value: 7881 }, + { name: 'NodeLinkTreeLayout', value: 12870 }, + { name: 'PieLayout', value: 2728 }, + { name: 'RadialTreeLayout', value: 12348 }, + { name: 'RandomLayout', value: 870 }, + { name: 'StackedAreaLayout', value: 9121 }, + { name: 'TreeMapLayout', value: 9191 }, + ], + }, + { name: 'Operator', value: 2490 }, + { name: 'OperatorList', value: 5248 }, + { name: 'OperatorSequence', value: 4190 }, + { name: 'OperatorSwitch', value: 2581 }, + { name: 'SortOperator', value: 2023 }, + ], + }, + { name: 'Visualization', value: 16540 }, + ], + }, + ], +}; diff --git a/src/views/fun/wangEditor/index.vue b/src/views/fun/wangEditor/index.vue index e2b9841a..dcd3ba06 100644 --- a/src/views/fun/wangEditor/index.vue +++ b/src/views/fun/wangEditor/index.vue @@ -1,39 +1,43 @@ \ No newline at end of file + diff --git a/src/views/home/index.vue b/src/views/home/index.vue index 656afd33..f171648d 100644 --- a/src/views/home/index.vue +++ b/src/views/home/index.vue @@ -1,418 +1,406 @@ \ No newline at end of file + diff --git a/src/views/home/mock.ts b/src/views/home/mock.ts index f97a0fd5..7eb34ed1 100644 --- a/src/views/home/mock.ts +++ b/src/views/home/mock.ts @@ -1,80 +1,80 @@ // 最顶部 card export const topCardItemList = [ - { - title: '今日访问人数', - titleNum: '123', - tip: '在场人数', - tipNum: '911', - color: '#F95959', - iconColor: '#F86C6B', - icon: 'iconfont icon-jinridaiban' - }, - { - title: '实验室总数', - titleNum: '123', - tip: '使用中', - tipNum: '611', - color: '#8595F4', - iconColor: '#92A1F4', - icon: 'iconfont icon-AIshiyanshi' - }, - { - title: '申请人数(月)', - titleNum: '123', - tip: '通过人数', - tipNum: '911', - color: '#FEBB50', - iconColor: '#FDC566', - icon: 'iconfont icon-shenqingkaiban' - } -] + { + title: '今日访问人数', + titleNum: '123', + tip: '在场人数', + tipNum: '911', + color: '#F95959', + iconColor: '#F86C6B', + icon: 'iconfont icon-jinridaiban', + }, + { + title: '实验室总数', + titleNum: '123', + tip: '使用中', + tipNum: '611', + color: '#8595F4', + iconColor: '#92A1F4', + icon: 'iconfont icon-AIshiyanshi', + }, + { + title: '申请人数(月)', + titleNum: '123', + tip: '通过人数', + tipNum: '911', + color: '#FEBB50', + iconColor: '#FDC566', + icon: 'iconfont icon-shenqingkaiban', + }, +]; // 环境监测 export const environmentList = [ - { - icon: 'iconfont icon-yangan', - label: '烟感', - value: '2.1%OBS/M', - iconColor: '#F72B3F' - }, - { - icon: 'iconfont icon-wendu', - label: '温度', - value: '30℃', - iconColor: '#91BFF8' - }, - { - icon: 'iconfont icon-shidu', - label: '湿度', - value: '57%RH', - iconColor: '#88D565' - }, - { - icon: 'iconfont icon-zaosheng', - label: '噪声', - value: '57DB', - iconColor: '#FBD4A0' - } -] + { + icon: 'iconfont icon-yangan', + label: '烟感', + value: '2.1%OBS/M', + iconColor: '#F72B3F', + }, + { + icon: 'iconfont icon-wendu', + label: '温度', + value: '30℃', + iconColor: '#91BFF8', + }, + { + icon: 'iconfont icon-shidu', + label: '湿度', + value: '57%RH', + iconColor: '#88D565', + }, + { + icon: 'iconfont icon-zaosheng', + label: '噪声', + value: '57DB', + iconColor: '#FBD4A0', + }, +]; // 动态信息 export const activitiesList = [ - { - time1: '今天', - time2: '12:20:30', - title: '更名', - label: '正式更名为 vue-next-admin' - }, - { - time1: '02-17', - time2: '12:20:30', - title: '页面', - label: '完成对首页的开发' - }, - { - time1: '02-14', - time2: '12:20:30', - title: '页面', - label: '新增个人中心' - } -] \ No newline at end of file + { + time1: '今天', + time2: '12:20:30', + title: '更名', + label: '正式更名为 vue-next-admin', + }, + { + time1: '02-17', + time2: '12:20:30', + title: '页面', + label: '完成对首页的开发', + }, + { + time1: '02-14', + time2: '12:20:30', + title: '页面', + label: '新增个人中心', + }, +]; diff --git a/src/views/layout/component/aside.vue b/src/views/layout/component/aside.vue index d85a9b39..480b2f71 100644 --- a/src/views/layout/component/aside.vue +++ b/src/views/layout/component/aside.vue @@ -1,151 +1,131 @@ \ No newline at end of file + diff --git a/src/views/layout/component/columnsAside.vue b/src/views/layout/component/columnsAside.vue index a9f39cd1..72e57904 100644 --- a/src/views/layout/component/columnsAside.vue +++ b/src/views/layout/component/columnsAside.vue @@ -1,211 +1,201 @@ \ No newline at end of file + diff --git a/src/views/layout/component/header.vue b/src/views/layout/component/header.vue index eee87ca5..45c597b5 100644 --- a/src/views/layout/component/header.vue +++ b/src/views/layout/component/header.vue @@ -1,27 +1,27 @@ \ No newline at end of file + diff --git a/src/views/layout/component/main.vue b/src/views/layout/component/main.vue index 40408b79..40691339 100644 --- a/src/views/layout/component/main.vue +++ b/src/views/layout/component/main.vue @@ -1,85 +1,93 @@ diff --git a/src/views/layout/footer/index.vue b/src/views/layout/footer/index.vue index 17b45de4..85ce7462 100644 --- a/src/views/layout/footer/index.vue +++ b/src/views/layout/footer/index.vue @@ -1,44 +1,44 @@ \ No newline at end of file + diff --git a/src/views/layout/index.vue b/src/views/layout/index.vue index 95b459cd..a26fc295 100644 --- a/src/views/layout/index.vue +++ b/src/views/layout/index.vue @@ -1,71 +1,57 @@ \ No newline at end of file + diff --git a/src/views/layout/lockScreen/index.vue b/src/views/layout/lockScreen/index.vue index f31717bf..3e42878e 100644 --- a/src/views/layout/lockScreen/index.vue +++ b/src/views/layout/lockScreen/index.vue @@ -1,290 +1,292 @@ \ No newline at end of file + diff --git a/src/views/layout/logo/index.vue b/src/views/layout/logo/index.vue index 7bff7112..b09ccb4d 100644 --- a/src/views/layout/logo/index.vue +++ b/src/views/layout/logo/index.vue @@ -1,85 +1,81 @@ \ No newline at end of file + diff --git a/src/views/layout/main/classic.vue b/src/views/layout/main/classic.vue index a0bbcca0..78426bdb 100644 --- a/src/views/layout/main/classic.vue +++ b/src/views/layout/main/classic.vue @@ -1,24 +1,24 @@ \ No newline at end of file + name: 'layoutClassic', + components: { Aside, Header, Main, TagsView }, +}; + diff --git a/src/views/layout/main/columns.vue b/src/views/layout/main/columns.vue index aa618ae2..bcc1c9df 100644 --- a/src/views/layout/main/columns.vue +++ b/src/views/layout/main/columns.vue @@ -1,38 +1,38 @@ \ No newline at end of file + name: 'layoutColumns', + components: { Aside, Header, Main, ColumnsAside }, + setup() { + const store = useStore(); + const isFixedHeader = computed(() => { + return store.state.themeConfig.themeConfig.isFixedHeader; + }); + return { + isFixedHeader, + }; + }, +}; + diff --git a/src/views/layout/main/defaults.vue b/src/views/layout/main/defaults.vue index 28494748..bb13fe86 100644 --- a/src/views/layout/main/defaults.vue +++ b/src/views/layout/main/defaults.vue @@ -1,44 +1,44 @@ \ No newline at end of file + name: 'layoutDefaults', + components: { Aside, Header, Main }, + setup() { + const { proxy } = getCurrentInstance(); + const store = useStore(); + const route = useRoute(); + const isFixedHeader = computed(() => { + return store.state.themeConfig.themeConfig.isFixedHeader; + }); + // 监听路由的变化 + watch( + () => route.path, + () => { + proxy.$refs.layoutDefaultsScrollbarRef.wrap.scrollTop = 0; + } + ); + return { + isFixedHeader, + }; + }, +}; + diff --git a/src/views/layout/main/transverse.vue b/src/views/layout/main/transverse.vue index 05f6b052..d5a1cd10 100644 --- a/src/views/layout/main/transverse.vue +++ b/src/views/layout/main/transverse.vue @@ -1,16 +1,16 @@ \ No newline at end of file + name: 'layoutTransverse', + components: { Header, Main }, +}; + diff --git a/src/views/layout/navBars/breadcrumb/breadcrumb.vue b/src/views/layout/navBars/breadcrumb/breadcrumb.vue index 50da232a..d765c6f5 100644 --- a/src/views/layout/navBars/breadcrumb/breadcrumb.vue +++ b/src/views/layout/navBars/breadcrumb/breadcrumb.vue @@ -1,121 +1,122 @@ \ No newline at end of file + diff --git a/src/views/layout/navBars/breadcrumb/index.vue b/src/views/layout/navBars/breadcrumb/index.vue index 34044d2c..b7cfc854 100644 --- a/src/views/layout/navBars/breadcrumb/index.vue +++ b/src/views/layout/navBars/breadcrumb/index.vue @@ -1,135 +1,120 @@ \ No newline at end of file + diff --git a/src/views/layout/navBars/breadcrumb/search.vue b/src/views/layout/navBars/breadcrumb/search.vue index e40b5e72..02a708f0 100644 --- a/src/views/layout/navBars/breadcrumb/search.vue +++ b/src/views/layout/navBars/breadcrumb/search.vue @@ -1,109 +1,110 @@ \ No newline at end of file + diff --git a/src/views/layout/navBars/breadcrumb/setings.vue b/src/views/layout/navBars/breadcrumb/setings.vue index f72ca450..926747fc 100644 --- a/src/views/layout/navBars/breadcrumb/setings.vue +++ b/src/views/layout/navBars/breadcrumb/setings.vue @@ -1,852 +1,795 @@ \ No newline at end of file + diff --git a/src/views/layout/navBars/breadcrumb/user.vue b/src/views/layout/navBars/breadcrumb/user.vue index daff49ee..59cc461a 100644 --- a/src/views/layout/navBars/breadcrumb/user.vue +++ b/src/views/layout/navBars/breadcrumb/user.vue @@ -1,202 +1,190 @@ \ No newline at end of file + diff --git a/src/views/layout/navBars/breadcrumb/userNews.vue b/src/views/layout/navBars/breadcrumb/userNews.vue index db42c3ef..db9240c0 100644 --- a/src/views/layout/navBars/breadcrumb/userNews.vue +++ b/src/views/layout/navBars/breadcrumb/userNews.vue @@ -1,114 +1,114 @@ \ No newline at end of file + diff --git a/src/views/layout/navBars/index.vue b/src/views/layout/navBars/index.vue index 6840de28..3d6d2d7c 100644 --- a/src/views/layout/navBars/index.vue +++ b/src/views/layout/navBars/index.vue @@ -1,37 +1,37 @@ \ No newline at end of file + diff --git a/src/views/layout/navBars/tagsView/contextmenu.vue b/src/views/layout/navBars/tagsView/contextmenu.vue index 5c041017..aea87066 100644 --- a/src/views/layout/navBars/tagsView/contextmenu.vue +++ b/src/views/layout/navBars/tagsView/contextmenu.vue @@ -1,107 +1,103 @@ \ No newline at end of file + diff --git a/src/views/layout/navBars/tagsView/tagsView.vue b/src/views/layout/navBars/tagsView/tagsView.vue index 9fa49141..e9a9f517 100644 --- a/src/views/layout/navBars/tagsView/tagsView.vue +++ b/src/views/layout/navBars/tagsView/tagsView.vue @@ -1,507 +1,494 @@ \ No newline at end of file + diff --git a/src/views/layout/navMenu/horizontal.vue b/src/views/layout/navMenu/horizontal.vue index 5f2e8c51..a4ccaf17 100644 --- a/src/views/layout/navMenu/horizontal.vue +++ b/src/views/layout/navMenu/horizontal.vue @@ -1,163 +1,144 @@ \ No newline at end of file + diff --git a/src/views/layout/navMenu/subItem.vue b/src/views/layout/navMenu/subItem.vue index 863bf01e..3a004d7d 100644 --- a/src/views/layout/navMenu/subItem.vue +++ b/src/views/layout/navMenu/subItem.vue @@ -1,47 +1,45 @@ diff --git a/src/views/layout/navMenu/vertical.vue b/src/views/layout/navMenu/vertical.vue index 5d099ceb..ef1fd392 100644 --- a/src/views/layout/navMenu/vertical.vue +++ b/src/views/layout/navMenu/vertical.vue @@ -1,82 +1,79 @@ diff --git a/src/views/layout/routerView/iframes.vue b/src/views/layout/routerView/iframes.vue index c703ce40..fd41ed02 100644 --- a/src/views/layout/routerView/iframes.vue +++ b/src/views/layout/routerView/iframes.vue @@ -1,72 +1,59 @@ \ No newline at end of file + diff --git a/src/views/layout/routerView/link.vue b/src/views/layout/routerView/link.vue index 4109ded2..57b6fcf9 100644 --- a/src/views/layout/routerView/link.vue +++ b/src/views/layout/routerView/link.vue @@ -1,30 +1,29 @@ \ No newline at end of file + diff --git a/src/views/layout/routerView/parent.vue b/src/views/layout/routerView/parent.vue index f9e1f156..decd9c5b 100644 --- a/src/views/layout/routerView/parent.vue +++ b/src/views/layout/routerView/parent.vue @@ -1,80 +1,60 @@ - - \ No newline at end of file diff --git a/src/views/limits/backEnd/page/index.vue b/src/views/limits/backEnd/page/index.vue index 9229a196..1f6a9503 100644 --- a/src/views/limits/backEnd/page/index.vue +++ b/src/views/limits/backEnd/page/index.vue @@ -1,27 +1,30 @@ \ No newline at end of file + diff --git a/src/views/limits/frontEnd/btn/index.vue b/src/views/limits/frontEnd/btn/index.vue index 77e4e11a..2042ad31 100644 --- a/src/views/limits/frontEnd/btn/index.vue +++ b/src/views/limits/frontEnd/btn/index.vue @@ -1,273 +1,251 @@ \ No newline at end of file + diff --git a/src/views/limits/frontEnd/page/index.vue b/src/views/limits/frontEnd/page/index.vue index e9001f90..07b1329f 100644 --- a/src/views/limits/frontEnd/page/index.vue +++ b/src/views/limits/frontEnd/page/index.vue @@ -1,106 +1,102 @@ \ No newline at end of file + diff --git a/src/views/login/component/account.vue b/src/views/login/component/account.vue index 36470d90..1b10dadf 100644 --- a/src/views/login/component/account.vue +++ b/src/views/login/component/account.vue @@ -1,181 +1,180 @@ \ No newline at end of file + diff --git a/src/views/login/component/mobile.vue b/src/views/login/component/mobile.vue index ea3c1b92..baae6f0e 100644 --- a/src/views/login/component/mobile.vue +++ b/src/views/login/component/mobile.vue @@ -1,55 +1,61 @@ \ No newline at end of file + diff --git a/src/views/login/index.vue b/src/views/login/index.vue index c7a93ce2..f2f08619 100644 --- a/src/views/login/index.vue +++ b/src/views/login/index.vue @@ -1,128 +1,133 @@ \ No newline at end of file + diff --git a/src/views/menu/menu1/menu11/index.vue b/src/views/menu/menu1/menu11/index.vue index fd9beb7f..d6d081f9 100644 --- a/src/views/menu/menu1/menu11/index.vue +++ b/src/views/menu/menu1/menu11/index.vue @@ -1,20 +1,20 @@ \ No newline at end of file + diff --git a/src/views/menu/menu1/menu12/menu121/index.vue b/src/views/menu/menu1/menu12/menu121/index.vue index bd087578..6b01b1be 100644 --- a/src/views/menu/menu1/menu12/menu121/index.vue +++ b/src/views/menu/menu1/menu12/menu121/index.vue @@ -1,20 +1,20 @@ \ No newline at end of file + diff --git a/src/views/menu/menu1/menu12/menu122/index.vue b/src/views/menu/menu1/menu12/menu122/index.vue index 6464ee70..52199c66 100644 --- a/src/views/menu/menu1/menu12/menu122/index.vue +++ b/src/views/menu/menu1/menu12/menu122/index.vue @@ -1,20 +1,20 @@ \ No newline at end of file + diff --git a/src/views/menu/menu1/menu13/index.vue b/src/views/menu/menu1/menu13/index.vue index c771e432..fe39925d 100644 --- a/src/views/menu/menu1/menu13/index.vue +++ b/src/views/menu/menu1/menu13/index.vue @@ -1,26 +1,26 @@ \ No newline at end of file + diff --git a/src/views/menu/menu2/index.vue b/src/views/menu/menu2/index.vue index f1825385..36127b69 100644 --- a/src/views/menu/menu2/index.vue +++ b/src/views/menu/menu2/index.vue @@ -1,20 +1,20 @@ \ No newline at end of file + diff --git a/src/views/pages/awesome/index.vue b/src/views/pages/awesome/index.vue index ffad37af..cbb3b554 100644 --- a/src/views/pages/awesome/index.vue +++ b/src/views/pages/awesome/index.vue @@ -1,87 +1,85 @@ \ No newline at end of file + diff --git a/src/views/pages/cityLinkage/index.vue b/src/views/pages/cityLinkage/index.vue index c3dc0d5c..9c7faf36 100644 --- a/src/views/pages/cityLinkage/index.vue +++ b/src/views/pages/cityLinkage/index.vue @@ -1,92 +1,95 @@ \ No newline at end of file + diff --git a/src/views/pages/element/index.vue b/src/views/pages/element/index.vue index efb8bf6f..72258008 100644 --- a/src/views/pages/element/index.vue +++ b/src/views/pages/element/index.vue @@ -1,88 +1,86 @@ \ No newline at end of file + diff --git a/src/views/pages/filtering/index.vue b/src/views/pages/filtering/index.vue index d4e4197e..37b59728 100644 --- a/src/views/pages/filtering/index.vue +++ b/src/views/pages/filtering/index.vue @@ -1,321 +1,342 @@ \ No newline at end of file + diff --git a/src/views/pages/filtering/mock.ts b/src/views/pages/filtering/mock.ts index c9961101..7ed3d9ed 100644 --- a/src/views/pages/filtering/mock.ts +++ b/src/views/pages/filtering/mock.ts @@ -1,219 +1,208 @@ // 导航数据 export const filtering = [ - { - title: "权限", - isMore: false, - id: 0, - children: [ - { - id: "01", - label: "全部", - active: true, - }, - { - id: "02", - label: "普通用户", - active: false, - }, - { - id: "03", - label: "管理员", - active: false, - }, - ], - }, - { - title: "布局", - isMore: false, - id: 1, - children: [ - { - id: 11, - label: "全部", - active: true, - }, - { - id: 12, - label: "默认", - active: false, - }, - { - id: 13, - label: "经典", - active: false, - }, - { - id: 14, - label: "横向", - active: false, - }, - { - id: 15, - label: "分栏", - active: false, - }, - ], - }, - { - title: "配置", - isMore: false, - id: 2, - children: [ - { - id: 21, - label: "全部", - active: true, - }, - { - id: 22, - label: "开启 Breadcrumb", - active: false, - }, - { - id: 23, - label: "开启 Tags-View", - active: false, - }, - { - id: 24, - label: "固定 Header", - active: false, - }, - { - id: 25, - label: "侧边栏 Logo", - active: false, - }, - { - id: 26, - label: "开启折叠 NavMenu", - active: false, - }, - { - id: 27, - label: "开启一个 NavMenu 展开", - active: false, - }, - { - id: 28, - label: "登录用户头像", - active: false, - }, - ], - }, + { + title: '权限', + isMore: false, + id: 0, + children: [ + { + id: '01', + label: '全部', + active: true, + }, + { + id: '02', + label: '普通用户', + active: false, + }, + { + id: '03', + label: '管理员', + active: false, + }, + ], + }, + { + title: '布局', + isMore: false, + id: 1, + children: [ + { + id: 11, + label: '全部', + active: true, + }, + { + id: 12, + label: '默认', + active: false, + }, + { + id: 13, + label: '经典', + active: false, + }, + { + id: 14, + label: '横向', + active: false, + }, + { + id: 15, + label: '分栏', + active: false, + }, + ], + }, + { + title: '配置', + isMore: false, + id: 2, + children: [ + { + id: 21, + label: '全部', + active: true, + }, + { + id: 22, + label: '开启 Breadcrumb', + active: false, + }, + { + id: 23, + label: '开启 Tags-View', + active: false, + }, + { + id: 24, + label: '固定 Header', + active: false, + }, + { + id: 25, + label: '侧边栏 Logo', + active: false, + }, + { + id: 26, + label: '开启折叠 NavMenu', + active: false, + }, + { + id: 27, + label: '开启一个 NavMenu 展开', + active: false, + }, + { + id: 28, + label: '登录用户头像', + active: false, + }, + ], + }, ]; // 列表数据 export const filterList = [ - { - img: - "http://news.sznews.com/pic/2020-08/14/9d9c9a60-f0af-41aa-b617-683b07c87642.jpg", - title: "嘉陵江2020年第1号洪水”在嘉陵江支流涪江形成", - evaluate: (Math.random() * 10).toFixed(2), - collection: (Math.random() * 100).toFixed(2), - price: (Math.random() * 10).toFixed(2), - monSales: (Math.random() * 20).toFixed(2), - id: 1, - isShowMore: false - }, - { - img: - "http://www.sznews.com/news/pic/2020-08/13/0ea47d3c-feb9-4bd7-8597-a8a373aa6340c6ec12c7-3b33-4528-91a6-85ec8ca1df67_watermark.png", - title: "让《民法典》走近群众 盐田街道开展人民调解宣传活动", - evaluate: (Math.random() * 10).toFixed(2), - collection: (Math.random() * 100).toFixed(2), - price: (Math.random() * 10).toFixed(2), - monSales: (Math.random() * 20).toFixed(2), - id: 2, - isShowMore: false - }, - { - img: - "http://www.sznews.com/photo/pic/2020-08/12/a08d6eb0-1d53-4f76-a313-ad3e5d701f98.jpg", - title: - "记者手记:可可西里,“挪”向“藏羚羊大产房”的14个半小时", - evaluate: (Math.random() * 10).toFixed(2), - collection: (Math.random() * 100).toFixed(2), - price: (Math.random() * 10).toFixed(2), - monSales: (Math.random() * 20).toFixed(2), - id: 3, - isShowMore: false - }, - { - img: - "http://www.sznews.com/photo/pic/2020-08/11/43cc0e14-9bca-45b9-9a8b-342e09d6a4c7.jpg", - title: "以优异成绩庆祝深圳经济特区建立40周年", - evaluate: (Math.random() * 10).toFixed(2), - collection: (Math.random() * 100).toFixed(2), - price: (Math.random() * 10).toFixed(2), - monSales: (Math.random() * 20).toFixed(2), - id: 4, - isShowMore: false - }, - { - img: - "http://www.sznews.com/photo/pic/2020-08/11/a4dc322b-68ec-40e6-8906-3124142c3e49.jpg", - title: "草原上的“太阳姑娘”", - evaluate: (Math.random() * 10).toFixed(2), - collection: (Math.random() * 100).toFixed(2), - price: (Math.random() * 10).toFixed(2), - monSales: (Math.random() * 20).toFixed(2), - id: 5, - isShowMore: false - }, - { - img: - "http://www.sznews.com/zhuanti/pic/2020-08/07/57f087b4-4812-46cc-adb9-ead73621284e.png", - title: "奇观天下|带你走进非洲野生动物观光第一目的地", - evaluate: (Math.random() * 10).toFixed(2), - collection: (Math.random() * 100).toFixed(2), - price: (Math.random() * 10).toFixed(2), - monSales: (Math.random() * 20).toFixed(2), - id: 6, - isShowMore: false - }, - { - img: - "http://news.sznews.com/pic/2020-09/02/t2_(101X54X600X335)7cd39301-d9cf-45f1-91c3-9575b1e5ce0e.jpg.2", - title: "五角大楼发布“中国军力报告” 华春莹: 罔顾事实,充满偏见", - evaluate: (Math.random() * 10).toFixed(2), - collection: (Math.random() * 100).toFixed(2), - price: (Math.random() * 10).toFixed(2), - monSales: (Math.random() * 20).toFixed(2), - id: 7, - isShowMore: false - }, - { - img: - "http://news.sznews.com/pic/2020-09/02/b8b41d9c-0508-4498-8d37-6e597493769f.jpg", - title: "最新地铁消息汇总:4号线北延、2号线三期、8号线一期等今年通车", - evaluate: (Math.random() * 10).toFixed(2), - collection: (Math.random() * 100).toFixed(2), - price: (Math.random() * 10).toFixed(2), - monSales: (Math.random() * 20).toFixed(2), - id: 8, - isShowMore: false - }, - { - img: - "http://www.sznews.com/photo/pic/2020-08/10/1635374c-f4d6-475c-ac47-1334176f365d.png", - title: "9月1日深圳新增5例无症状感染者!钟南山这段话冲上热搜!", - evaluate: (Math.random() * 10).toFixed(2), - collection: (Math.random() * 100).toFixed(2), - price: (Math.random() * 10).toFixed(2), - monSales: (Math.random() * 20).toFixed(2), - id: 9, - isShowMore: false - }, - { - img: - "http://www.sznews.com/news/pic/2020-08/13/646e5458-92b7-4636-9940-9b0799babfe1.png", - title: "全能“小福宝” 为文明社区建设添砖加瓦", - evaluate: (Math.random() * 10).toFixed(2), - collection: (Math.random() * 100).toFixed(2), - price: (Math.random() * 10).toFixed(2), - monSales: (Math.random() * 20).toFixed(2), - id: 10, - isShowMore: false - }, + { + img: 'http://news.sznews.com/pic/2020-08/14/9d9c9a60-f0af-41aa-b617-683b07c87642.jpg', + title: '嘉陵江2020年第1号洪水”在嘉陵江支流涪江形成', + evaluate: (Math.random() * 10).toFixed(2), + collection: (Math.random() * 100).toFixed(2), + price: (Math.random() * 10).toFixed(2), + monSales: (Math.random() * 20).toFixed(2), + id: 1, + isShowMore: false, + }, + { + img: 'http://www.sznews.com/news/pic/2020-08/13/0ea47d3c-feb9-4bd7-8597-a8a373aa6340c6ec12c7-3b33-4528-91a6-85ec8ca1df67_watermark.png', + title: '让《民法典》走近群众 盐田街道开展人民调解宣传活动', + evaluate: (Math.random() * 10).toFixed(2), + collection: (Math.random() * 100).toFixed(2), + price: (Math.random() * 10).toFixed(2), + monSales: (Math.random() * 20).toFixed(2), + id: 2, + isShowMore: false, + }, + { + img: 'http://www.sznews.com/photo/pic/2020-08/12/a08d6eb0-1d53-4f76-a313-ad3e5d701f98.jpg', + title: '记者手记:可可西里,“挪”向“藏羚羊大产房”的14个半小时', + evaluate: (Math.random() * 10).toFixed(2), + collection: (Math.random() * 100).toFixed(2), + price: (Math.random() * 10).toFixed(2), + monSales: (Math.random() * 20).toFixed(2), + id: 3, + isShowMore: false, + }, + { + img: 'http://www.sznews.com/photo/pic/2020-08/11/43cc0e14-9bca-45b9-9a8b-342e09d6a4c7.jpg', + title: '以优异成绩庆祝深圳经济特区建立40周年', + evaluate: (Math.random() * 10).toFixed(2), + collection: (Math.random() * 100).toFixed(2), + price: (Math.random() * 10).toFixed(2), + monSales: (Math.random() * 20).toFixed(2), + id: 4, + isShowMore: false, + }, + { + img: 'http://www.sznews.com/photo/pic/2020-08/11/a4dc322b-68ec-40e6-8906-3124142c3e49.jpg', + title: '草原上的“太阳姑娘”', + evaluate: (Math.random() * 10).toFixed(2), + collection: (Math.random() * 100).toFixed(2), + price: (Math.random() * 10).toFixed(2), + monSales: (Math.random() * 20).toFixed(2), + id: 5, + isShowMore: false, + }, + { + img: 'http://www.sznews.com/zhuanti/pic/2020-08/07/57f087b4-4812-46cc-adb9-ead73621284e.png', + title: '奇观天下|带你走进非洲野生动物观光第一目的地', + evaluate: (Math.random() * 10).toFixed(2), + collection: (Math.random() * 100).toFixed(2), + price: (Math.random() * 10).toFixed(2), + monSales: (Math.random() * 20).toFixed(2), + id: 6, + isShowMore: false, + }, + { + img: 'http://news.sznews.com/pic/2020-09/02/t2_(101X54X600X335)7cd39301-d9cf-45f1-91c3-9575b1e5ce0e.jpg.2', + title: '五角大楼发布“中国军力报告” 华春莹: 罔顾事实,充满偏见', + evaluate: (Math.random() * 10).toFixed(2), + collection: (Math.random() * 100).toFixed(2), + price: (Math.random() * 10).toFixed(2), + monSales: (Math.random() * 20).toFixed(2), + id: 7, + isShowMore: false, + }, + { + img: 'http://news.sznews.com/pic/2020-09/02/b8b41d9c-0508-4498-8d37-6e597493769f.jpg', + title: '最新地铁消息汇总:4号线北延、2号线三期、8号线一期等今年通车', + evaluate: (Math.random() * 10).toFixed(2), + collection: (Math.random() * 100).toFixed(2), + price: (Math.random() * 10).toFixed(2), + monSales: (Math.random() * 20).toFixed(2), + id: 8, + isShowMore: false, + }, + { + img: 'http://www.sznews.com/photo/pic/2020-08/10/1635374c-f4d6-475c-ac47-1334176f365d.png', + title: '9月1日深圳新增5例无症状感染者!钟南山这段话冲上热搜!', + evaluate: (Math.random() * 10).toFixed(2), + collection: (Math.random() * 100).toFixed(2), + price: (Math.random() * 10).toFixed(2), + monSales: (Math.random() * 20).toFixed(2), + id: 9, + isShowMore: false, + }, + { + img: 'http://www.sznews.com/news/pic/2020-08/13/646e5458-92b7-4636-9940-9b0799babfe1.png', + title: '全能“小福宝” 为文明社区建设添砖加瓦', + evaluate: (Math.random() * 10).toFixed(2), + collection: (Math.random() * 100).toFixed(2), + price: (Math.random() * 10).toFixed(2), + monSales: (Math.random() * 20).toFixed(2), + id: 10, + isShowMore: false, + }, ]; diff --git a/src/views/pages/formAdapt/index.vue b/src/views/pages/formAdapt/index.vue index e69fc414..c12ebd6f 100644 --- a/src/views/pages/formAdapt/index.vue +++ b/src/views/pages/formAdapt/index.vue @@ -1,97 +1,97 @@ \ No newline at end of file + diff --git a/src/views/pages/iocnfont/index.vue b/src/views/pages/iocnfont/index.vue index 19e5f231..b502b241 100644 --- a/src/views/pages/iocnfont/index.vue +++ b/src/views/pages/iocnfont/index.vue @@ -1,82 +1,82 @@ \ No newline at end of file + diff --git a/src/views/pages/listAdapt/index.vue b/src/views/pages/listAdapt/index.vue index f42ff218..60c78fa6 100644 --- a/src/views/pages/listAdapt/index.vue +++ b/src/views/pages/listAdapt/index.vue @@ -1,170 +1,176 @@ \ No newline at end of file + diff --git a/src/views/pages/listAdapt/mock.ts b/src/views/pages/listAdapt/mock.ts index a8df5299..252b1acf 100644 --- a/src/views/pages/listAdapt/mock.ts +++ b/src/views/pages/listAdapt/mock.ts @@ -1,114 +1,103 @@ // 列表数据 export const filterList = [ - { - img: - "https://news.sznews.com/pic/2021-03/09/e37326cc-4583-48f3-aa00-ecc2392d319d.jpg", - title: "36分钟,深圳平均通勤时间出炉!GDP10强城市中仅输杭州", - evaluate: (Math.random() * 10).toFixed(2), - collection: (Math.random() * 100).toFixed(2), - price: (Math.random() * 10).toFixed(2), - monSales: (Math.random() * 20).toFixed(2), - id: 1, - isShowMore: false - }, - { - img: - "http://news.sznews.com/pic/2021-03/09/78cf72b6-e2d9-459d-a368-470414a027f4679cf4ea-26fa-48c8-9fee-c2d092a91400.png", - title: "为爱而动,“红色鹊桥”三八妇女节交友联谊活动助力深圳女孩脱单", - evaluate: (Math.random() * 10).toFixed(2), - collection: (Math.random() * 100).toFixed(2), - price: (Math.random() * 10).toFixed(2), - monSales: (Math.random() * 20).toFixed(2), - id: 2, - isShowMore: false - }, - { - img: - "http://news.sznews.com/pic/2021-03/09/1faf3c6e-1250-4e6b-b072-4a331553e027.jpg", - title: - "粤桂协作“背水一战” 解决广西大化县3.7万人饮水难题", - evaluate: (Math.random() * 10).toFixed(2), - collection: (Math.random() * 100).toFixed(2), - price: (Math.random() * 10).toFixed(2), - monSales: (Math.random() * 20).toFixed(2), - id: 3, - isShowMore: false - }, - { - img: - "https://news.sznews.com/pic/2021-03/09/9fcf6dd4-1e80-4497-bdc9-83dc7246d170.jpg.2", - title: "城镇就业女性平均薪酬6847元 女性职场渗透率提升", - evaluate: (Math.random() * 10).toFixed(2), - collection: (Math.random() * 100).toFixed(2), - price: (Math.random() * 10).toFixed(2), - monSales: (Math.random() * 20).toFixed(2), - id: 4, - isShowMore: false - }, - { - img: - "https://news.sznews.com/pic/2021-03/09/1bd78227-4126-4a43-bdf6-48ead6edd1bf.jpg.2", - title: "深圳:实现“从0到1”源头创新,推进大湾区综合性国家科学中心建设!", - evaluate: (Math.random() * 10).toFixed(2), - collection: (Math.random() * 100).toFixed(2), - price: (Math.random() * 10).toFixed(2), - monSales: (Math.random() * 20).toFixed(2), - id: 5, - isShowMore: false - }, - { - img: - "http://news.sznews.com/pic/2021-03/08/9ea943a3-3ae8-4f49-8296-711ec36ef8c6_watermark.png", - title: "煖声音第126期|愿你有诗酒趁年华的洒脱,也有岁月沉淀后的坚定从容", - evaluate: (Math.random() * 10).toFixed(2), - collection: (Math.random() * 100).toFixed(2), - price: (Math.random() * 10).toFixed(2), - monSales: (Math.random() * 20).toFixed(2), - id: 6, - isShowMore: false - }, - { - img: - "https://news.sznews.com/pic/2021-03/08/a95ba232-1422-4f7e-b85f-c61d486c8659.jpg.2", - title: "姐妹们一起来吐槽,最不能接受男人的缺点!", - evaluate: (Math.random() * 10).toFixed(2), - collection: (Math.random() * 100).toFixed(2), - price: (Math.random() * 10).toFixed(2), - monSales: (Math.random() * 20).toFixed(2), - id: 7, - isShowMore: false - }, - { - img: - "http://news.sznews.com/pic/2021-03/08/76816bf0-3899-4c7e-bc6e-079b5ba8725e.jpg", - title: "民生小事 | 手机遗落出租车 热心民警帮找回", - evaluate: (Math.random() * 10).toFixed(2), - collection: (Math.random() * 100).toFixed(2), - price: (Math.random() * 10).toFixed(2), - monSales: (Math.random() * 20).toFixed(2), - id: 8, - isShowMore: false - }, - { - img: - "https://news.sznews.com/pic/2021-03/08/28ed70d4-71f5-4abb-bf7b-0294bece9e43.jpg.2", - title: "“十三五”:深圳交上靓丽答卷 发展动力加快转换", - evaluate: (Math.random() * 10).toFixed(2), - collection: (Math.random() * 100).toFixed(2), - price: (Math.random() * 10).toFixed(2), - monSales: (Math.random() * 20).toFixed(2), - id: 9, - isShowMore: false - }, - { - img: - "http://news.sznews.com/pic/2021-03/05/d13ae31f-fd45-431a-b48e-c5895bbc193e.png", - title: "深圳湾公园一女子落水,三名男子接力及时施救", - evaluate: (Math.random() * 10).toFixed(2), - collection: (Math.random() * 100).toFixed(2), - price: (Math.random() * 10).toFixed(2), - monSales: (Math.random() * 20).toFixed(2), - id: 10, - isShowMore: false - }, + { + img: 'https://news.sznews.com/pic/2021-03/09/e37326cc-4583-48f3-aa00-ecc2392d319d.jpg', + title: '36分钟,深圳平均通勤时间出炉!GDP10强城市中仅输杭州', + evaluate: (Math.random() * 10).toFixed(2), + collection: (Math.random() * 100).toFixed(2), + price: (Math.random() * 10).toFixed(2), + monSales: (Math.random() * 20).toFixed(2), + id: 1, + isShowMore: false, + }, + { + img: 'http://news.sznews.com/pic/2021-03/09/78cf72b6-e2d9-459d-a368-470414a027f4679cf4ea-26fa-48c8-9fee-c2d092a91400.png', + title: '为爱而动,“红色鹊桥”三八妇女节交友联谊活动助力深圳女孩脱单', + evaluate: (Math.random() * 10).toFixed(2), + collection: (Math.random() * 100).toFixed(2), + price: (Math.random() * 10).toFixed(2), + monSales: (Math.random() * 20).toFixed(2), + id: 2, + isShowMore: false, + }, + { + img: 'http://news.sznews.com/pic/2021-03/09/1faf3c6e-1250-4e6b-b072-4a331553e027.jpg', + title: '粤桂协作“背水一战” 解决广西大化县3.7万人饮水难题', + evaluate: (Math.random() * 10).toFixed(2), + collection: (Math.random() * 100).toFixed(2), + price: (Math.random() * 10).toFixed(2), + monSales: (Math.random() * 20).toFixed(2), + id: 3, + isShowMore: false, + }, + { + img: 'https://news.sznews.com/pic/2021-03/09/9fcf6dd4-1e80-4497-bdc9-83dc7246d170.jpg.2', + title: '城镇就业女性平均薪酬6847元 女性职场渗透率提升', + evaluate: (Math.random() * 10).toFixed(2), + collection: (Math.random() * 100).toFixed(2), + price: (Math.random() * 10).toFixed(2), + monSales: (Math.random() * 20).toFixed(2), + id: 4, + isShowMore: false, + }, + { + img: 'https://news.sznews.com/pic/2021-03/09/1bd78227-4126-4a43-bdf6-48ead6edd1bf.jpg.2', + title: '深圳:实现“从0到1”源头创新,推进大湾区综合性国家科学中心建设!', + evaluate: (Math.random() * 10).toFixed(2), + collection: (Math.random() * 100).toFixed(2), + price: (Math.random() * 10).toFixed(2), + monSales: (Math.random() * 20).toFixed(2), + id: 5, + isShowMore: false, + }, + { + img: 'http://news.sznews.com/pic/2021-03/08/9ea943a3-3ae8-4f49-8296-711ec36ef8c6_watermark.png', + title: '煖声音第126期|愿你有诗酒趁年华的洒脱,也有岁月沉淀后的坚定从容', + evaluate: (Math.random() * 10).toFixed(2), + collection: (Math.random() * 100).toFixed(2), + price: (Math.random() * 10).toFixed(2), + monSales: (Math.random() * 20).toFixed(2), + id: 6, + isShowMore: false, + }, + { + img: 'https://news.sznews.com/pic/2021-03/08/a95ba232-1422-4f7e-b85f-c61d486c8659.jpg.2', + title: '姐妹们一起来吐槽,最不能接受男人的缺点!', + evaluate: (Math.random() * 10).toFixed(2), + collection: (Math.random() * 100).toFixed(2), + price: (Math.random() * 10).toFixed(2), + monSales: (Math.random() * 20).toFixed(2), + id: 7, + isShowMore: false, + }, + { + img: 'http://news.sznews.com/pic/2021-03/08/76816bf0-3899-4c7e-bc6e-079b5ba8725e.jpg', + title: '民生小事 | 手机遗落出租车 热心民警帮找回', + evaluate: (Math.random() * 10).toFixed(2), + collection: (Math.random() * 100).toFixed(2), + price: (Math.random() * 10).toFixed(2), + monSales: (Math.random() * 20).toFixed(2), + id: 8, + isShowMore: false, + }, + { + img: 'https://news.sznews.com/pic/2021-03/08/28ed70d4-71f5-4abb-bf7b-0294bece9e43.jpg.2', + title: '“十三五”:深圳交上靓丽答卷 发展动力加快转换', + evaluate: (Math.random() * 10).toFixed(2), + collection: (Math.random() * 100).toFixed(2), + price: (Math.random() * 10).toFixed(2), + monSales: (Math.random() * 20).toFixed(2), + id: 9, + isShowMore: false, + }, + { + img: 'http://news.sznews.com/pic/2021-03/05/d13ae31f-fd45-431a-b48e-c5895bbc193e.png', + title: '深圳湾公园一女子落水,三名男子接力及时施救', + evaluate: (Math.random() * 10).toFixed(2), + collection: (Math.random() * 100).toFixed(2), + price: (Math.random() * 10).toFixed(2), + monSales: (Math.random() * 20).toFixed(2), + id: 10, + isShowMore: false, + }, ]; diff --git a/src/views/personal/index.vue b/src/views/personal/index.vue index 76538bbb..b16c7209 100644 --- a/src/views/personal/index.vue +++ b/src/views/personal/index.vue @@ -1,377 +1,374 @@ \ No newline at end of file + diff --git a/src/views/personal/mock.ts b/src/views/personal/mock.ts index 2c87fd9e..7cb8dd7b 100644 --- a/src/views/personal/mock.ts +++ b/src/views/personal/mock.ts @@ -1,57 +1,55 @@ // 消息通知 export const newsInfoList: Array = [ - { - title: "[发布] 2021年02月28日发布 vue3.x v1.0.0 版本", - date: "02/28", - link: "https://gitee.com/lyt-top/vue-next-admin", - }, - { - title: "[发布] 2020年11月15日发布 vue2.x v1.0.0 版本", - date: "11/15", - link: "https://gitee.com/lyt-top/vue-admin-wonderful", - }, - { - title: - "[预览] 2020年12月08日,基于 vue3.x 版本后台模板的预览", - date: "12/08", - link: "http://lyt-top.gitee.io/vue-next-admin-preview", - }, - { - title: - "[预览] 2020年11月15日,基于 vue2.x 版本后台模板的预览", - date: "11/15", - link: "http://lyt-top.gitee.io/vue-admin-wonderful-preview", - }, -] + { + title: '[发布] 2021年02月28日发布 vue3.x v1.0.0 版本', + date: '02/28', + link: 'https://gitee.com/lyt-top/vue-next-admin', + }, + { + title: '[发布] 2020年11月15日发布 vue2.x v1.0.0 版本', + date: '11/15', + link: 'https://gitee.com/lyt-top/vue-admin-wonderful', + }, + { + title: '[预览] 2020年12月08日,基于 vue3.x 版本后台模板的预览', + date: '12/08', + link: 'http://lyt-top.gitee.io/vue-next-admin-preview', + }, + { + title: '[预览] 2020年11月15日,基于 vue2.x 版本后台模板的预览', + date: '11/15', + link: 'http://lyt-top.gitee.io/vue-admin-wonderful-preview', + }, +]; // 营销推荐 export const recommendList: Array = [ - { - title: "优惠券", - msg: "现金券、折扣券、营销必备", - icon: "el-icon-food", - bg: "#48D18D", - iconColor: "#64d89d", - }, - { - title: "多人拼团", - msg: "社交电商、开辟流量", - icon: "el-icon-shopping-bag-1", - bg: "#F95959", - iconColor: "#F86C6B", - }, - { - title: "分销中心", - msg: "轻松招募分销员,成功推广奖励", - icon: "el-icon-school", - bg: "#8595F4", - iconColor: "#92A1F4", - }, - { - title: "秒杀", - msg: "超低价抢购引导更多销量", - icon: "el-icon-alarm-clock", - bg: "#FEBB50", - iconColor: "#FDC566", - }, -] \ No newline at end of file + { + title: '优惠券', + msg: '现金券、折扣券、营销必备', + icon: 'el-icon-food', + bg: '#48D18D', + iconColor: '#64d89d', + }, + { + title: '多人拼团', + msg: '社交电商、开辟流量', + icon: 'el-icon-shopping-bag-1', + bg: '#F95959', + iconColor: '#F86C6B', + }, + { + title: '分销中心', + msg: '轻松招募分销员,成功推广奖励', + icon: 'el-icon-school', + bg: '#8595F4', + iconColor: '#92A1F4', + }, + { + title: '秒杀', + msg: '超低价抢购引导更多销量', + icon: 'el-icon-alarm-clock', + bg: '#FEBB50', + iconColor: '#FDC566', + }, +]; diff --git a/src/views/system/menu/component/addMenu.vue b/src/views/system/menu/component/addMenu.vue index 8be65bac..5f084b4c 100644 --- a/src/views/system/menu/component/addMenu.vue +++ b/src/views/system/menu/component/addMenu.vue @@ -1,192 +1,202 @@ \ No newline at end of file + diff --git a/src/views/system/menu/component/editMenu.vue b/src/views/system/menu/component/editMenu.vue index b95a3661..0b400757 100644 --- a/src/views/system/menu/component/editMenu.vue +++ b/src/views/system/menu/component/editMenu.vue @@ -1,204 +1,213 @@ \ No newline at end of file + diff --git a/src/views/system/menu/index.vue b/src/views/system/menu/index.vue index 4f8282d8..9dfe8e37 100644 --- a/src/views/system/menu/index.vue +++ b/src/views/system/menu/index.vue @@ -1,110 +1,111 @@ \ No newline at end of file + diff --git a/src/views/system/user/index.vue b/src/views/system/user/index.vue index 6df65b68..e3d36865 100644 --- a/src/views/system/user/index.vue +++ b/src/views/system/user/index.vue @@ -1,100 +1,114 @@ \ No newline at end of file + diff --git a/src/views/tools/index.vue b/src/views/tools/index.vue index 7cd0001b..44095699 100644 --- a/src/views/tools/index.vue +++ b/src/views/tools/index.vue @@ -1,483 +1,462 @@ \ No newline at end of file + diff --git a/tsconfig.json b/tsconfig.json index 15402540..6d0a9e6b 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,72 +1,70 @@ { - "compilerOptions": { - /* Visit https://aka.ms/tsconfig.json to read more about this file */ + "compilerOptions": { + /* Visit https://aka.ms/tsconfig.json to read more about this file */ - /* Basic Options */ - // "incremental": true, /* Enable incremental compilation */ - "target": "esnext" /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */, - "module": "esnext" /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */, - // "lib": [], /* Specify library files to be included in the compilation. */ - // "allowJs": true, /* Allow javascript files to be compiled. */ - // "checkJs": true, /* Report errors in .js files. */ - "jsx": "preserve" /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */, - // "declaration": true, /* Generates corresponding '.d.ts' file. */ - // "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */ - // "sourceMap": true, /* Generates corresponding '.map' file. */ - // "outFile": "./", /* Concatenate and emit output to single file. */ - // "outDir": "./", /* Redirect output structure to the directory. */ - // "rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */ - // "composite": true, /* Enable project compilation */ - // "tsBuildInfoFile": "./", /* Specify file to store incremental compilation information */ - // "removeComments": true, /* Do not emit comments to output. */ - // "noEmit": true, /* Do not emit outputs. */ - // "importHelpers": true, /* Import emit helpers from 'tslib'. */ - // "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */ - // "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */ + /* Basic Options */ + // "incremental": true, /* Enable incremental compilation */ + "target": "esnext" /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */, + "module": "esnext" /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */, + "lib": ["ESNext", "DOM", "DOM.Iterable"] /* Specify library files to be included in the compilation. */, + // "allowJs": true, /* Allow javascript files to be compiled. */ + // "checkJs": true, /* Report errors in .js files. */ + "jsx": "preserve" /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */, + // "declaration": true /* Generates corresponding '.d.ts' file. */, + // "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */ + // "sourceMap": true, /* Generates corresponding '.map' file. */ + // "outFile": "./", /* Concatenate and emit output to single file. */ + // "outDir": "./", /* Redirect output structure to the directory. */ + // "rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */ + // "composite": true, /* Enable project compilation */ + // "tsBuildInfoFile": "./", /* Specify file to store incremental compilation information */ + // "removeComments": true, /* Do not emit comments to output. */ + // "noEmit": true, /* Do not emit outputs. */ + // "importHelpers": true /* Import emit helpers from 'tslib'. */, + // "downlevelIteration": true /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */, + // "isolatedModules": true /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */, - /* Strict Type-Checking Options */ - "strict": true /* Enable all strict type-checking options. */, - // "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */ - // "strictNullChecks": true, /* Enable strict null checks. */ - // "strictFunctionTypes": true, /* Enable strict checking of function types. */ - // "strictBindCallApply": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */ - // "strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */ - // "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */ - // "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */ + /* Strict Type-Checking Options */ + "strict": true /* Enable all strict type-checking options. */, + // "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */ + // "strictNullChecks": true, /* Enable strict null checks. */ + // "strictFunctionTypes": true, /* Enable strict checking of function types. */ + // "strictBindCallApply": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */ + // "strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */ + // "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */ + // "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */ - /* Additional Checks */ - // "noUnusedLocals": true, /* Report errors on unused locals. */ - // "noUnusedParameters": true, /* Report errors on unused parameters. */ - // "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */ - // "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */ - // "noUncheckedIndexedAccess": true, /* Include 'undefined' in index signature results */ + /* Additional Checks */ + // "noUnusedLocals": true, /* Report errors on unused locals. */ + // "noUnusedParameters": true, /* Report errors on unused parameters. */ + // "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */ + // "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */ + // "noUncheckedIndexedAccess": true, /* Include 'undefined' in index signature results */ - /* Module Resolution Options */ - "moduleResolution": "node" /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */, - "baseUrl": "." /* Base directory to resolve non-absolute module names. */, - // "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */ - // "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */ - // "typeRoots": [], /* List of folders to include type definitions from. */ - "types": [ - "vite/client" - ] /* Type declaration files to be included in compilation. */, - "allowSyntheticDefaultImports": true /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */, - "esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */, - // "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */ - // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ + /* Module Resolution Options */ + "moduleResolution": "node" /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */, + "baseUrl": "." /* Base directory to resolve non-absolute module names. */, + // "paths": { } /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */, + // "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */ + // "typeRoots": [], /* List of folders to include type definitions from. */ + "types": ["vite/client"] /* Type declaration files to be included in compilation. */, + "allowSyntheticDefaultImports": true /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */, + "esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */, + // "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */ + // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ - /* Source Map Options */ - // "sourceRoot": "", /* Specify the location where debugger should locate TypeScript files instead of source locations. */ - // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */ - // "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */ - // "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */ + /* Source Map Options */ + // "sourceRoot": "", /* Specify the location where debugger should locate TypeScript files instead of source locations. */ + // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */ + // "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */ + // "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */ - /* Experimental Options */ - // "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */ - // "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */ + /* Experimental Options */ + // "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */ + // "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */ - /* Advanced Options */ - "skipLibCheck": true /* Skip type checking of declaration files. */, - "forceConsistentCasingInFileNames": true /* Disallow inconsistently-cased references to the same file. */ - } + /* Advanced Options */ + "skipLibCheck": true /* Skip type checking of declaration files. */, + "forceConsistentCasingInFileNames": true /* Disallow inconsistently-cased references to the same file. */ + } } diff --git a/vite.config.ts b/vite.config.ts index 88b0a275..b7eb4555 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -1,41 +1,41 @@ -import vue from '@vitejs/plugin-vue' -import type { UserConfig } from 'vite' -import { loadEnv } from './build/utils' +import vue from '@vitejs/plugin-vue'; +import type { UserConfig } from 'vite'; +import { loadEnv } from './src/utils/viteBuild.ts'; -const { VITE_PORT, VITE_OPEN, VITE_PUBLIC_PATH } = loadEnv() +const { VITE_PORT, VITE_OPEN, VITE_PUBLIC_PATH } = loadEnv(); const viteConfig: UserConfig = { - plugins: [vue()], - root: process.cwd(), - resolve: { - alias: [ - { - find: /^\/@\//, - replacement: '/src/' - } - ] - }, - base: process.env.NODE_ENV === "production" ? VITE_PUBLIC_PATH : './', - optimizeDeps: { - include: ['element-plus/lib/locale/lang/zh-cn'] - }, - server: { - port: VITE_PORT, - open: VITE_OPEN, - proxy: { - '/gitee': { - target: 'https://gitee.com', - ws: true, - changeOrigin: true, - rewrite: (path) => path.replace(/^\/gitee/, ''), - } - } - }, - build: { - outDir: 'dist', - minify: 'terser', - sourcemap: false - } -} + plugins: [vue()], + root: process.cwd(), + resolve: { + alias: [ + { + find: /^\/@\//, + replacement: '/src/', + }, + ], + }, + base: process.env.NODE_ENV === 'production' ? VITE_PUBLIC_PATH : './', + optimizeDeps: { + include: ['element-plus/lib/locale/lang/zh-cn'], + }, + server: { + port: VITE_PORT, + open: VITE_OPEN, + proxy: { + '/gitee': { + target: 'https://gitee.com', + ws: true, + changeOrigin: true, + rewrite: (path) => path.replace(/^\/gitee/, ''), + }, + }, + }, + build: { + outDir: 'dist', + minify: 'esbuild', + sourcemap: false, + }, +}; -export default viteConfig +export default viteConfig; diff --git a/yarn.lock b/yarn.lock deleted file mode 100644 index b3f07c41..00000000 --- a/yarn.lock +++ /dev/null @@ -1,702 +0,0 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. -# yarn lockfile v1 - - -"@babel/helper-validator-identifier@^7.12.11": - version "7.12.11" - resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.12.11.tgz#c9a1f021917dcb5ccf0d4e453e399022981fc9ed" - integrity sha512-np/lG3uARFybkoHokJUmf1QfEvRVCPbmQeUQpKow5cQ3xWrV9i3rUHodKDJPQfTVX61qKi+UdYk8kik84n7XOw== - -"@babel/parser@^7.12.0": - version "7.13.9" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.13.9.tgz#ca34cb95e1c2dd126863a84465ae8ef66114be99" - integrity sha512-nEUfRiARCcaVo3ny3ZQjURjHQZUo/JkEw7rLlSZy/psWGnvwXFtPcr6jb7Yb41DVW5LTe6KRq9LGleRNsg1Frw== - -"@babel/types@^7.12.0": - version "7.13.0" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.13.0.tgz#74424d2816f0171b4100f0ab34e9a374efdf7f80" - integrity sha512-hE+HE8rnG1Z6Wzo+MhaKE5lM5eMx71T4EHJgku2E3xIfaULhDcxiiRxUYgwX8qwP1BBSlag+TdGOt6JAidIZTA== - dependencies: - "@babel/helper-validator-identifier" "^7.12.11" - lodash "^4.17.19" - to-fast-properties "^2.0.0" - -"@popperjs/core@^2.4.4": - version "2.9.0" - resolved "https://registry.yarnpkg.com/@popperjs/core/-/core-2.9.0.tgz#32e63212293dd3efbb521cd35a5020ab66eaa546" - integrity sha512-wjtKehFAIARq2OxK8j3JrggNlEslJfNuSm2ArteIbKyRMts2g0a7KzTxfRVNUM+O0gnBJ2hNV8nWPOYBgI1sew== - -"@types/axios@^0.14.0": - version "0.14.0" - resolved "https://registry.yarnpkg.com/@types/axios/-/axios-0.14.0.tgz#ec2300fbe7d7dddd7eb9d3abf87999964cafce46" - integrity sha1-7CMA++fX3d1+udOr+HmZlkyvzkY= - dependencies: - axios "*" - -"@types/clipboard@^2.0.1": - version "2.0.1" - resolved "https://registry.yarnpkg.com/@types/clipboard/-/clipboard-2.0.1.tgz#75a74086c293d75b12bc93ff13bc7797fef05a40" - integrity sha512-gJJX9Jjdt3bIAePQRRjYWG20dIhAgEqonguyHxXuqALxsoDsDLimihqrSg8fXgVTJ4KZCzkfglKtwsh/8dLfbA== - -"@types/node@^14.14.31": - version "14.14.31" - resolved "https://registry.yarnpkg.com/@types/node/-/node-14.14.31.tgz#72286bd33d137aa0d152d47ec7c1762563d34055" - integrity sha512-vFHy/ezP5qI0rFgJ7aQnjDXwAMrG0KqqIH7tQG5PPv3BWBayOPIQNBjVc/P6hhdZfMx51REc6tfDNXHUio893g== - -"@types/nprogress@^0.2.0": - version "0.2.0" - resolved "https://registry.yarnpkg.com/@types/nprogress/-/nprogress-0.2.0.tgz#86c593682d4199212a0509cc3c4d562bbbd6e45f" - integrity sha512-1cYJrqq9GezNFPsWTZpFut/d4CjpZqA0vhqDUPFWYKF1oIyBz5qnoYMzR+0C/T96t3ebLAC1SSnwrVOm5/j74A== - -"@types/sortablejs@^1.10.6": - version "1.10.6" - resolved "https://registry.yarnpkg.com/@types/sortablejs/-/sortablejs-1.10.6.tgz#98725ae08f1dfe28b8da0fdf302c417f5ff043c0" - integrity sha512-QRz8Z+uw2Y4Gwrtxw8hD782zzuxxugdcq8X/FkPsXUa1kfslhGzy13+4HugO9FXNo+jlWVcE6DYmmegniIQ30A== - -"@vitejs/plugin-vue@^1.1.5": - version "1.1.5" - resolved "https://registry.yarnpkg.com/@vitejs/plugin-vue/-/plugin-vue-1.1.5.tgz#fa1e8e5e049c35e213672e33f73fe81706ad5dbe" - integrity sha512-4DV8VPYo8/OR1YsnK39QN16xhKENt2XvcmJxqfRtyz75kvbjBYh1zTSHLp7XsXqv4R2I+fOZlbEBvxosMYLcPA== - -"@vue/compiler-core@3.0.7": - version "3.0.7" - resolved "https://registry.yarnpkg.com/@vue/compiler-core/-/compiler-core-3.0.7.tgz#421782a4c67cc3f2b7c30457ef446d74f8524f74" - integrity sha512-JFohgBXoyUc3mdeI2WxlhjQZ5fakfemJkZHX8Gu/nFbEg3+lKVUZmNKWmmnp9aOzJQZKoj77LjmFxiP+P+7lMQ== - dependencies: - "@babel/parser" "^7.12.0" - "@babel/types" "^7.12.0" - "@vue/shared" "3.0.7" - estree-walker "^2.0.1" - source-map "^0.6.1" - -"@vue/compiler-dom@3.0.7": - version "3.0.7" - resolved "https://registry.yarnpkg.com/@vue/compiler-dom/-/compiler-dom-3.0.7.tgz#54d2e12fb9a7aff53abd19dac2c2679533f0c919" - integrity sha512-VnIH9EbWQm/Tkcp+8dCaNVsVvhm/vxCrIKWRkXY9215hTqOqQOvejT8IMjd2kc++nIsYMsdQk6H9qqBvoLe/Cw== - dependencies: - "@vue/compiler-core" "3.0.7" - "@vue/shared" "3.0.7" - -"@vue/compiler-sfc@^3.0.7": - version "3.0.7" - resolved "https://registry.yarnpkg.com/@vue/compiler-sfc/-/compiler-sfc-3.0.7.tgz#900414750cc726553b870490f48073451fd14f07" - integrity sha512-37/QILpGE+J3V+bP9Slg9e6xGqfk+MmS2Yj8ChR4fS0/qWUU/YoYHE0GPIzjmBdH0JVOOmJqunxowIXmqNiHng== - dependencies: - "@babel/parser" "^7.12.0" - "@babel/types" "^7.12.0" - "@vue/compiler-core" "3.0.7" - "@vue/compiler-dom" "3.0.7" - "@vue/compiler-ssr" "3.0.7" - "@vue/shared" "3.0.7" - consolidate "^0.16.0" - estree-walker "^2.0.1" - hash-sum "^2.0.0" - lru-cache "^5.1.1" - magic-string "^0.25.7" - merge-source-map "^1.1.0" - postcss "^8.1.10" - postcss-modules "^4.0.0" - postcss-selector-parser "^6.0.4" - source-map "^0.6.1" - -"@vue/compiler-ssr@3.0.7": - version "3.0.7" - resolved "https://registry.yarnpkg.com/@vue/compiler-ssr/-/compiler-ssr-3.0.7.tgz#28b85d497381d75fe44234057b140b0065ca9dbf" - integrity sha512-nHRbHeSpfXwjypettjrA16TjgfDcPEwq3m/zHnGyLC1QqdLtklXmpSM43/CPwwTCRa/qdt0pldJf22MiCEuTSQ== - dependencies: - "@vue/compiler-dom" "3.0.7" - "@vue/shared" "3.0.7" - -"@vue/reactivity@3.0.7": - version "3.0.7" - resolved "https://registry.yarnpkg.com/@vue/reactivity/-/reactivity-3.0.7.tgz#e6ccc7bef7fc10b0972e4d974bad71679d3b26ad" - integrity sha512-FotWcNNaKhqpFZrdgsUOZ1enlJ5lhTt01CNTtLSyK7jYFgZBTuw8vKsEutZKDYZ1XKotOfoeO8N3pZQqmM6Etw== - dependencies: - "@vue/shared" "3.0.7" - -"@vue/runtime-core@3.0.7": - version "3.0.7" - resolved "https://registry.yarnpkg.com/@vue/runtime-core/-/runtime-core-3.0.7.tgz#d44c0b0a57d7e392912a87362a4430ccf446ecea" - integrity sha512-DBAZAwVvdmMXuyd6/9qqj/kYr/GaLTmn1L2/QLxLwP+UfhIboiTSBc/tUUb8MRk7Bb98GzNeAWkkT6AfooS3dQ== - dependencies: - "@vue/reactivity" "3.0.7" - "@vue/shared" "3.0.7" - -"@vue/runtime-dom@3.0.7": - version "3.0.7" - resolved "https://registry.yarnpkg.com/@vue/runtime-dom/-/runtime-dom-3.0.7.tgz#b70668d729020bc4ad608c20367223f259576ba6" - integrity sha512-Oij4ruOtnpQpCj+/Q3JPzgpTJ1Q7+N67pA53A8KVITEtxfvKL46NN6dhAZ5NGqwX6RWZpYqWQNewITeF0pHr8g== - dependencies: - "@vue/runtime-core" "3.0.7" - "@vue/shared" "3.0.7" - csstype "^2.6.8" - -"@vue/shared@3.0.7": - version "3.0.7" - resolved "https://registry.yarnpkg.com/@vue/shared/-/shared-3.0.7.tgz#96d52988efc07444c108c7c6803ba7cc93e40045" - integrity sha512-dn5FyfSc4ky424jH4FntiHno7Ss5yLkqKNmM/NXwANRnlkmqu74pnGetexDFVG5phMk9/FhwovUZCWGxsotVKg== - -anymatch@~3.1.1: - version "3.1.1" - resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.1.tgz#c55ecf02185e2469259399310c173ce31233b142" - integrity sha512-mM8522psRCqzV+6LhomX5wgp25YVibjh8Wj23I5RPkPppSVSjyKD2A2mBJmWGa+KN7f2D6LNh9jkBCeyLktzjg== - dependencies: - normalize-path "^3.0.0" - picomatch "^2.0.4" - -async-validator@^3.4.0: - version "3.5.1" - resolved "https://registry.yarnpkg.com/async-validator/-/async-validator-3.5.1.tgz#cd62b9688b2465f48420e27adb47760ab1b5559f" - integrity sha512-DDmKA7sdSAJtTVeNZHrnr2yojfFaoeW8MfQN8CeuXg8DDQHTqKk9Fdv38dSvnesHoO8MUwMI2HphOeSyIF+wmQ== - -axios@*, axios@^0.21.1: - version "0.21.1" - resolved "https://registry.yarnpkg.com/axios/-/axios-0.21.1.tgz#22563481962f4d6bde9a76d516ef0e5d3c09b2b8" - integrity sha512-dKQiRHxGD9PPRIUNIWvZhPTPpl1rf/OxTYKsqKUDjBwYylTvV7SjSHJb9ratfyzM6wCdLCOYLzs73qpg5c4iGA== - dependencies: - follow-redirects "^1.10.0" - -big.js@^5.2.2: - version "5.2.2" - resolved "https://registry.yarnpkg.com/big.js/-/big.js-5.2.2.tgz#65f0af382f578bcdc742bd9c281e9cb2d7768328" - integrity sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ== - -binary-extensions@^2.0.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.2.0.tgz#75f502eeaf9ffde42fc98829645be4ea76bd9e2d" - integrity sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA== - -bluebird@^3.7.2: - version "3.7.2" - resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.7.2.tgz#9f229c15be272454ffa973ace0dbee79a1b0c36f" - integrity sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg== - -braces@~3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107" - integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A== - dependencies: - fill-range "^7.0.1" - -"chokidar@>=2.0.0 <4.0.0": - version "3.5.1" - resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.5.1.tgz#ee9ce7bbebd2b79f49f304799d5468e31e14e68a" - integrity sha512-9+s+Od+W0VJJzawDma/gvBNQqkTiqYTWLuZoyAsivsI4AaWTCzHG06/TMjsf1cYe9Cb97UCEhjz7HvnPk2p/tw== - dependencies: - anymatch "~3.1.1" - braces "~3.0.2" - glob-parent "~5.1.0" - is-binary-path "~2.1.0" - is-glob "~4.0.1" - normalize-path "~3.0.0" - readdirp "~3.5.0" - optionalDependencies: - fsevents "~2.3.1" - -clipboard@^2.0.6: - version "2.0.6" - resolved "https://registry.yarnpkg.com/clipboard/-/clipboard-2.0.6.tgz#52921296eec0fdf77ead1749421b21c968647376" - integrity sha512-g5zbiixBRk/wyKakSwCKd7vQXDjFnAMGHoEyBogG/bw9kTD9GvdAvaoRR1ALcEzt3pVKxZR0pViekPMIS0QyGg== - dependencies: - good-listener "^1.2.2" - select "^1.1.2" - tiny-emitter "^2.0.0" - -colorette@^1.2.2: - version "1.2.2" - resolved "https://registry.yarnpkg.com/colorette/-/colorette-1.2.2.tgz#cbcc79d5e99caea2dbf10eb3a26fd8b3e6acfa94" - integrity sha512-MKGMzyfeuutC/ZJ1cba9NqcNpfeqMUcYmyF1ZFY6/Cn7CNSAKx6a+s48sqLqyAiZuaP2TcqMhoo+dlwFnVxT9w== - -consolidate@^0.16.0: - version "0.16.0" - resolved "https://registry.yarnpkg.com/consolidate/-/consolidate-0.16.0.tgz#a11864768930f2f19431660a65906668f5fbdc16" - integrity sha512-Nhl1wzCslqXYTJVDyJCu3ODohy9OfBMB5uD2BiBTzd7w+QY0lBzafkR8y8755yMYHAaMD4NuzbAw03/xzfw+eQ== - dependencies: - bluebird "^3.7.2" - -countup.js@^2.0.7: - version "2.0.7" - resolved "https://registry.yarnpkg.com/countup.js/-/countup.js-2.0.7.tgz#56b72a87fc0ee3cadb38356c246ccac88fb0a8cc" - integrity sha512-FO0nQdvG1iQwHp28wdvkErxnNUSbdkzztqZ6YNHKLHydngD2tdiKEW8dFrqpahF3tj+Ma70h0vyYrCBzxlVWdg== - -cssesc@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/cssesc/-/cssesc-3.0.0.tgz#37741919903b868565e1c09ea747445cd18983ee" - integrity sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg== - -csstype@^2.6.8: - version "2.6.16" - resolved "https://registry.yarnpkg.com/csstype/-/csstype-2.6.16.tgz#544d69f547013b85a40d15bff75db38f34fe9c39" - integrity sha512-61FBWoDHp/gRtsoDkq/B1nWrCUG/ok1E3tUrcNbZjsE9Cxd9yzUirjS3+nAATB8U4cTtaQmAHbNndoFz5L6C9Q== - -dayjs@1.x: - version "1.10.4" - resolved "https://registry.yarnpkg.com/dayjs/-/dayjs-1.10.4.tgz#8e544a9b8683f61783f570980a8a80eaf54ab1e2" - integrity sha512-RI/Hh4kqRc1UKLOAf/T5zdMMX5DQIlDxwUe3wSyMMnEbGunnpENCdbUgM+dW7kXidZqCttBrmw7BhN4TMddkCw== - -delegate@^3.1.2: - version "3.2.0" - resolved "https://registry.yarnpkg.com/delegate/-/delegate-3.2.0.tgz#b66b71c3158522e8ab5744f720d8ca0c2af59166" - integrity sha512-IofjkYBZaZivn0V8nnsMJGBr4jVLxHDheKSW88PyxS5QC4Vo9ZbZVvhzlSxY87fVq3STR6r+4cGepyHkcWOQSw== - -dotenv@^8.2.0: - version "8.2.0" - resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-8.2.0.tgz#97e619259ada750eea3e4ea3e26bceea5424b16a" - integrity sha512-8sJ78ElpbDJBHNeBzUbUVLsqKdccaa/BXF1uPTw3GrvQTBgrQrtObr2mUrE38vzYd8cEv+m/JBfDLioYcfXoaw== - -echarts-wordcloud@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/echarts-wordcloud/-/echarts-wordcloud-2.0.0.tgz#52ef817895801ffe9e99dd1bacab7686b2dec04a" - integrity sha512-K7l6pTklqdW7ZWzT/1CS0KhBSINr/cd7c5N1fVMzZMwLQHEwT7x+nivK7g5hkVh7WNcAv4Dn6/ZS5zMKRozC1g== - -echarts@^5.0.2: - version "5.0.2" - resolved "https://registry.yarnpkg.com/echarts/-/echarts-5.0.2.tgz#1726d17a57cf05d62cd0567b4325e1201a56baf6" - integrity sha512-En0VYpc96nw2/2AZoBWPHsGi471zMublttj50kfFpYAeR4geup0Tj9iVgEXh7QYZFPnRiruDJEjcB5PXZ+BYzQ== - dependencies: - tslib "2.0.3" - zrender "5.0.4" - -element-plus@^1.0.2-beta.33: - version "1.0.2-beta.33" - resolved "https://registry.yarnpkg.com/element-plus/-/element-plus-1.0.2-beta.33.tgz#0e924c8872dbc14e916ed5d6452d9799b04d4c60" - integrity sha512-CHm+KO/d1rJ8R+0S3Hi0xwHhia5KSGChp/w1M8rWZNDQsjHJv/8CEpGSet8htXzgpl4amIFEOb7+uKP38Hu2Xw== - dependencies: - "@popperjs/core" "^2.4.4" - async-validator "^3.4.0" - dayjs "1.x" - lodash "^4.17.20" - mitt "^2.1.0" - normalize-wheel "^1.0.1" - resize-observer-polyfill "^1.5.1" - -emojis-list@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/emojis-list/-/emojis-list-3.0.0.tgz#5570662046ad29e2e916e71aae260abdff4f6a78" - integrity sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q== - -esbuild@^0.8.52: - version "0.8.56" - resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.8.56.tgz#9c7c3d6e614db7367afa348adb0ab287c296735e" - integrity sha512-PTMdAWK3JI2MNW811znGssGP5GR44tQPr++VQ1rPP0n8Z1cTKbCPD3S/kXPLr3ZZDIwAaVm08fuFym6Rp8l/0A== - -estree-walker@^2.0.1: - version "2.0.2" - resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-2.0.2.tgz#52f010178c2a4c117a7757cfe942adb7d2da4cac" - integrity sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w== - -fill-range@^7.0.1: - version "7.0.1" - resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.0.1.tgz#1919a6a7c75fe38b2c7c77e5198535da9acdda40" - integrity sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ== - dependencies: - to-regex-range "^5.0.1" - -follow-redirects@^1.10.0: - version "1.13.3" - resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.13.3.tgz#e5598ad50174c1bc4e872301e82ac2cd97f90267" - integrity sha512-DUgl6+HDzB0iEptNQEXLx/KhTmDb8tZUHSeLqpnjpknR70H0nC2t9N73BK6fN4hOvJ84pKlIQVQ4k5FFlBedKA== - -fsevents@~2.3.1: - version "2.3.2" - resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.2.tgz#8a526f78b8fdf4623b709e0b975c52c24c02fd1a" - integrity sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA== - -function-bind@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" - integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A== - -generic-names@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/generic-names/-/generic-names-2.0.1.tgz#f8a378ead2ccaa7a34f0317b05554832ae41b872" - integrity sha512-kPCHWa1m9wGG/OwQpeweTwM/PYiQLrUIxXbt/P4Nic3LbGjCP0YwrALHW1uNLKZ0LIMg+RF+XRlj2ekT9ZlZAQ== - dependencies: - loader-utils "^1.1.0" - -glob-parent@~5.1.0: - version "5.1.1" - resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.1.tgz#b6c1ef417c4e5663ea498f1c45afac6916bbc229" - integrity sha512-FnI+VGOpnlGHWZxthPGR+QhR78fuiK0sNLkHQv+bL9fQi57lNNdquIbna/WrfROrolq8GK5Ek6BiMwqL/voRYQ== - dependencies: - is-glob "^4.0.1" - -good-listener@^1.2.2: - version "1.2.2" - resolved "https://registry.yarnpkg.com/good-listener/-/good-listener-1.2.2.tgz#d53b30cdf9313dffb7dc9a0d477096aa6d145c50" - integrity sha1-1TswzfkxPf+33JoNR3CWqm0UXFA= - dependencies: - delegate "^3.1.2" - -has@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/has/-/has-1.0.3.tgz#722d7cbfc1f6aa8241f16dd814e011e1f41e8796" - integrity sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw== - dependencies: - function-bind "^1.1.1" - -hash-sum@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/hash-sum/-/hash-sum-2.0.0.tgz#81d01bb5de8ea4a214ad5d6ead1b523460b0b45a" - integrity sha512-WdZTbAByD+pHfl/g9QSsBIIwy8IT+EsPiKDs0KNX+zSHhdDLFKdZu0BQHljvO+0QI/BasbMSUa8wYNCZTvhslg== - -icss-replace-symbols@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/icss-replace-symbols/-/icss-replace-symbols-1.1.0.tgz#06ea6f83679a7749e386cfe1fe812ae5db223ded" - integrity sha1-Bupvg2ead0njhs/h/oEq5dsiPe0= - -icss-utils@^5.0.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/icss-utils/-/icss-utils-5.1.0.tgz#c6be6858abd013d768e98366ae47e25d5887b1ae" - integrity sha512-soFhflCVWLfRNOPU3iv5Z9VUdT44xFRbzjLsEzSr5AQmgqPMTHdU3PMT1Cf1ssx8fLNJDA1juftYl+PUcv3MqA== - -indexes-of@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/indexes-of/-/indexes-of-1.0.1.tgz#f30f716c8e2bd346c7b67d3df3915566a7c05607" - integrity sha1-8w9xbI4r00bHtn0985FVZqfAVgc= - -is-binary-path@~2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-2.1.0.tgz#ea1f7f3b80f064236e83470f86c09c254fb45b09" - integrity sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw== - dependencies: - binary-extensions "^2.0.0" - -is-core-module@^2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.2.0.tgz#97037ef3d52224d85163f5597b2b63d9afed981a" - integrity sha512-XRAfAdyyY5F5cOXn7hYQDqh2Xmii+DEfIcQGxK/uNwMHhIkPWO0g8msXcbzLe+MpGoR951MlqM/2iIlU4vKDdQ== - dependencies: - has "^1.0.3" - -is-extglob@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" - integrity sha1-qIwCU1eR8C7TfHahueqXc8gz+MI= - -is-glob@^4.0.1, is-glob@~4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.1.tgz#7567dbe9f2f5e2467bc77ab83c4a29482407a5dc" - integrity sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg== - dependencies: - is-extglob "^2.1.1" - -is-number@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b" - integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== - -json5@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/json5/-/json5-1.0.1.tgz#779fb0018604fa854eacbf6252180d83543e3dbe" - integrity sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow== - dependencies: - minimist "^1.2.0" - -klona@^2.0.4: - version "2.0.4" - resolved "https://registry.yarnpkg.com/klona/-/klona-2.0.4.tgz#7bb1e3affb0cb8624547ef7e8f6708ea2e39dfc0" - integrity sha512-ZRbnvdg/NxqzC7L9Uyqzf4psi1OM4Cuc+sJAkQPjO6XkQIJTNbfK2Rsmbw8fx1p2mkZdp2FZYo2+LwXYY/uwIA== - -loader-utils@^1.1.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-1.4.0.tgz#c579b5e34cb34b1a74edc6c1fb36bfa371d5a613" - integrity sha512-qH0WSMBtn/oHuwjy/NucEgbx5dbxxnxup9s4PVXJUDHZBQY+s0NWA9rJf53RBnQZxfch7euUui7hpoAPvALZdA== - dependencies: - big.js "^5.2.2" - emojis-list "^3.0.0" - json5 "^1.0.1" - -lodash.camelcase@^4.3.0: - version "4.3.0" - resolved "https://registry.yarnpkg.com/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz#b28aa6288a2b9fc651035c7711f65ab6190331a6" - integrity sha1-soqmKIorn8ZRA1x3EfZathkDMaY= - -lodash@^4.17.19, lodash@^4.17.20: - version "4.17.21" - resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" - integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== - -lru-cache@^5.1.1: - version "5.1.1" - resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-5.1.1.tgz#1da27e6710271947695daf6848e847f01d84b920" - integrity sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w== - dependencies: - yallist "^3.0.2" - -magic-string@^0.25.7: - version "0.25.7" - resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.25.7.tgz#3f497d6fd34c669c6798dcb821f2ef31f5445051" - integrity sha512-4CrMT5DOHTDk4HYDlzmwu4FVCcIYI8gauveasrdCu2IKIFOJ3f0v/8MDGJCDL9oD2ppz/Av1b0Nj345H9M+XIA== - dependencies: - sourcemap-codec "^1.4.4" - -merge-source-map@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/merge-source-map/-/merge-source-map-1.1.0.tgz#2fdde7e6020939f70906a68f2d7ae685e4c8c646" - integrity sha512-Qkcp7P2ygktpMPh2mCQZaf3jhN6D3Z/qVZHSdWvQ+2Ef5HgRAPBO57A77+ENm0CPx2+1Ce/MYKi3ymqdfuqibw== - dependencies: - source-map "^0.6.1" - -minimist@^1.2.0: - version "1.2.5" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.5.tgz#67d66014b66a6a8aaa0c083c5fd58df4e4e97602" - integrity sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw== - -mitt@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/mitt/-/mitt-2.1.0.tgz#f740577c23176c6205b121b2973514eade1b2230" - integrity sha512-ILj2TpLiysu2wkBbWjAmww7TkZb65aiQO+DkVdUTBpBXq+MHYiETENkKFMtsJZX1Lf4pe4QOrTSjIfUwN5lRdg== - -nanoid@^3.1.20: - version "3.1.20" - resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.1.20.tgz#badc263c6b1dcf14b71efaa85f6ab4c1d6cfc788" - integrity sha512-a1cQNyczgKbLX9jwbS/+d7W8fX/RfgYR7lVWwWOGIPNgK2m0MWvrGF6/m4kk6U3QcFMnZf3RIhL0v2Jgh/0Uxw== - -neo-async@^2.6.2: - version "2.6.2" - resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.6.2.tgz#b4aafb93e3aeb2d8174ca53cf163ab7d7308305f" - integrity sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw== - -normalize-path@^3.0.0, normalize-path@~3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65" - integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA== - -normalize-wheel@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/normalize-wheel/-/normalize-wheel-1.0.1.tgz#aec886affdb045070d856447df62ecf86146ec45" - integrity sha1-rsiGr/2wRQcNhWRH32Ls+GFG7EU= - -nprogress@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/nprogress/-/nprogress-0.2.0.tgz#cb8f34c53213d895723fcbab907e9422adbcafb1" - integrity sha1-y480xTIT2JVyP8urkH6UIq28r7E= - -path-parse@^1.0.6: - version "1.0.6" - resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.6.tgz#d62dbb5679405d72c4737ec58600e9ddcf06d24c" - integrity sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw== - -picomatch@^2.0.4, picomatch@^2.2.1: - version "2.2.2" - resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.2.2.tgz#21f333e9b6b8eaff02468f5146ea406d345f4dad" - integrity sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg== - -postcss-modules-extract-imports@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/postcss-modules-extract-imports/-/postcss-modules-extract-imports-3.0.0.tgz#cda1f047c0ae80c97dbe28c3e76a43b88025741d" - integrity sha512-bdHleFnP3kZ4NYDhuGlVK+CMrQ/pqUm8bx/oGL93K6gVwiclvX5x0n76fYMKuIGKzlABOy13zsvqjb0f92TEXw== - -postcss-modules-local-by-default@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/postcss-modules-local-by-default/-/postcss-modules-local-by-default-4.0.0.tgz#ebbb54fae1598eecfdf691a02b3ff3b390a5a51c" - integrity sha512-sT7ihtmGSF9yhm6ggikHdV0hlziDTX7oFoXtuVWeDd3hHObNkcHRo9V3yg7vCAY7cONyxJC/XXCmmiHHcvX7bQ== - dependencies: - icss-utils "^5.0.0" - postcss-selector-parser "^6.0.2" - postcss-value-parser "^4.1.0" - -postcss-modules-scope@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/postcss-modules-scope/-/postcss-modules-scope-3.0.0.tgz#9ef3151456d3bbfa120ca44898dfca6f2fa01f06" - integrity sha512-hncihwFA2yPath8oZ15PZqvWGkWf+XUfQgUGamS4LqoP1anQLOsOJw0vr7J7IwLpoY9fatA2qiGUGmuZL0Iqlg== - dependencies: - postcss-selector-parser "^6.0.4" - -postcss-modules-values@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/postcss-modules-values/-/postcss-modules-values-4.0.0.tgz#d7c5e7e68c3bb3c9b27cbf48ca0bb3ffb4602c9c" - integrity sha512-RDxHkAiEGI78gS2ofyvCsu7iycRv7oqw5xMWn9iMoR0N/7mf9D50ecQqUo5BZ9Zh2vH4bCUR/ktCqbB9m8vJjQ== - dependencies: - icss-utils "^5.0.0" - -postcss-modules@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/postcss-modules/-/postcss-modules-4.0.0.tgz#2bc7f276ab88f3f1b0fadf6cbd7772d43b5f3b9b" - integrity sha512-ghS/ovDzDqARm4Zj6L2ntadjyQMoyJmi0JkLlYtH2QFLrvNlxH5OAVRPWPeKilB0pY7SbuhO173KOWkPAxRJcw== - dependencies: - generic-names "^2.0.1" - icss-replace-symbols "^1.1.0" - lodash.camelcase "^4.3.0" - postcss-modules-extract-imports "^3.0.0" - postcss-modules-local-by-default "^4.0.0" - postcss-modules-scope "^3.0.0" - postcss-modules-values "^4.0.0" - string-hash "^1.1.1" - -postcss-selector-parser@^6.0.2, postcss-selector-parser@^6.0.4: - version "6.0.4" - resolved "https://registry.yarnpkg.com/postcss-selector-parser/-/postcss-selector-parser-6.0.4.tgz#56075a1380a04604c38b063ea7767a129af5c2b3" - integrity sha512-gjMeXBempyInaBqpp8gODmwZ52WaYsVOsfr4L4lDQ7n3ncD6mEyySiDtgzCT+NYC0mmeOLvtsF8iaEf0YT6dBw== - dependencies: - cssesc "^3.0.0" - indexes-of "^1.0.1" - uniq "^1.0.1" - util-deprecate "^1.0.2" - -postcss-value-parser@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/postcss-value-parser/-/postcss-value-parser-4.1.0.tgz#443f6a20ced6481a2bda4fa8532a6e55d789a2cb" - integrity sha512-97DXOFbQJhk71ne5/Mt6cOu6yxsSfM0QGQyl0L25Gca4yGWEGJaig7l7gbCX623VqTBNGLRLaVUCnNkcedlRSQ== - -postcss@^8.1.10, postcss@^8.2.1: - version "8.2.7" - resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.2.7.tgz#48ed8d88b4de10afa0dfd1c3f840aa57b55c4d47" - integrity sha512-DsVLH3xJzut+VT+rYr0mtvOtpTjSyqDwPf5EZWXcb0uAKfitGpTY9Ec+afi2+TgdN8rWS9Cs88UDYehKo/RvOw== - dependencies: - colorette "^1.2.2" - nanoid "^3.1.20" - source-map "^0.6.1" - -readdirp@~3.5.0: - version "3.5.0" - resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.5.0.tgz#9ba74c019b15d365278d2e91bb8c48d7b4d42c9e" - integrity sha512-cMhu7c/8rdhkHXWsY+osBhfSy0JikwpHK/5+imo+LpeasTF8ouErHrlYkwT0++njiyuDvc7OFY5T3ukvZ8qmFQ== - dependencies: - picomatch "^2.2.1" - -resize-observer-polyfill@^1.5.1: - version "1.5.1" - resolved "https://registry.yarnpkg.com/resize-observer-polyfill/-/resize-observer-polyfill-1.5.1.tgz#0e9020dd3d21024458d4ebd27e23e40269810464" - integrity sha512-LwZrotdHOo12nQuZlHEmtuXdqGoOD0OhaxopaNFxWzInpEgaLWoVuAMbTzixuosCx2nEG58ngzW3vxdWoxIgdg== - -resolve@^1.19.0: - version "1.20.0" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.20.0.tgz#629a013fb3f70755d6f0b7935cc1c2c5378b1975" - integrity sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A== - dependencies: - is-core-module "^2.2.0" - path-parse "^1.0.6" - -rollup@^2.38.5: - version "2.40.0" - resolved "https://registry.yarnpkg.com/rollup/-/rollup-2.40.0.tgz#efc218eaede7ab590954df50f96195188999c304" - integrity sha512-WiOGAPbXoHu+TOz6hyYUxIksOwsY/21TRWoO593jgYt8mvYafYqQl+axaA8y1z2HFazNUUrsMSjahV2A6/2R9A== - optionalDependencies: - fsevents "~2.3.1" - -sass-loader@^11.0.1: - version "11.0.1" - resolved "https://registry.yarnpkg.com/sass-loader/-/sass-loader-11.0.1.tgz#8672f896593466573b904f47693e0695368e38c9" - integrity sha512-Vp1LcP4slTsTNLEiDkTcm8zGN/XYYrZz2BZybQbliWA8eXveqA/AxsEjllQTpJbg2MzCsx/qNO48sHdZtOaxTw== - dependencies: - klona "^2.0.4" - neo-async "^2.6.2" - -sass@^1.32.8: - version "1.32.8" - resolved "https://registry.yarnpkg.com/sass/-/sass-1.32.8.tgz#f16a9abd8dc530add8834e506878a2808c037bdc" - integrity sha512-Sl6mIeGpzjIUZqvKnKETfMf0iDAswD9TNlv13A7aAF3XZlRPMq4VvJWBC2N2DXbp94MQVdNSFG6LfF/iOXrPHQ== - dependencies: - chokidar ">=2.0.0 <4.0.0" - -screenfull@^5.1.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/screenfull/-/screenfull-5.1.0.tgz#85c13c70f4ead4c1b8a935c70010dfdcd2c0e5c8" - integrity sha512-dYaNuOdzr+kc6J6CFcBrzkLCfyGcMg+gWkJ8us93IQ7y1cevhQAugFsaCdMHb6lw8KV3xPzSxzH7zM1dQap9mA== - -select@^1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/select/-/select-1.1.2.tgz#0e7350acdec80b1108528786ec1d4418d11b396d" - integrity sha1-DnNQrN7ICxEIUoeG7B1EGNEbOW0= - -sortablejs@^1.13.0: - version "1.13.0" - resolved "https://registry.yarnpkg.com/sortablejs/-/sortablejs-1.13.0.tgz#3ab2473f8c69ca63569e80b1cd1b5669b51269e9" - integrity sha512-RBJirPY0spWCrU5yCmWM1eFs/XgX2J5c6b275/YyxFRgnzPhKl/TDeU2hNR8Dt7ITq66NRPM4UlOt+e5O4CFHg== - -source-map@^0.6.1: - version "0.6.1" - resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" - integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== - -sourcemap-codec@^1.4.4: - version "1.4.8" - resolved "https://registry.yarnpkg.com/sourcemap-codec/-/sourcemap-codec-1.4.8.tgz#ea804bd94857402e6992d05a38ef1ae35a9ab4c4" - integrity sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA== - -string-hash@^1.1.1: - version "1.1.3" - resolved "https://registry.yarnpkg.com/string-hash/-/string-hash-1.1.3.tgz#e8aafc0ac1855b4666929ed7dd1275df5d6c811b" - integrity sha1-6Kr8CsGFW0Zmkp7X3RJ1311sgRs= - -tiny-emitter@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/tiny-emitter/-/tiny-emitter-2.1.0.tgz#1d1a56edfc51c43e863cbb5382a72330e3555423" - integrity sha512-NB6Dk1A9xgQPMoGqC5CVXn123gWyte215ONT5Pp5a0yt4nlEoO1ZWeCwpncaekPHXO60i47ihFnZPiRPjRMq4Q== - -to-fast-properties@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-2.0.0.tgz#dc5e698cbd079265bc73e0377681a4e4e83f616e" - integrity sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4= - -to-regex-range@^5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4" - integrity sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ== - dependencies: - is-number "^7.0.0" - -tslib@2.0.3: - version "2.0.3" - resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.0.3.tgz#8e0741ac45fc0c226e58a17bfc3e64b9bc6ca61c" - integrity sha512-uZtkfKblCEQtZKBF6EBXVZeQNl82yqtDQdv+eck8u7tdPxjLu2/lp5/uPW+um2tpuxINHWy3GhiccY7QgEaVHQ== - -typescript@^4.2.3: - version "4.2.3" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.2.3.tgz#39062d8019912d43726298f09493d598048c1ce3" - integrity sha512-qOcYwxaByStAWrBf4x0fibwZvMRG+r4cQoTjbPtUlrWjBHbmCAww1i448U0GJ+3cNNEtebDteo/cHOR3xJ4wEw== - -uniq@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/uniq/-/uniq-1.0.1.tgz#b31c5ae8254844a3a8281541ce2b04b865a734ff" - integrity sha1-sxxa6CVIRKOoKBVBzisEuGWnNP8= - -util-deprecate@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" - integrity sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8= - -vite@^2.0.5: - version "2.0.5" - resolved "https://registry.yarnpkg.com/vite/-/vite-2.0.5.tgz#ac46857a3fa8686d077921e61bd48a986931df1d" - integrity sha512-QTgEDbq1WsTtr6j+++ewjhBFEk6c8v0xz4fb/OWJQKNYU8ZZtphOshwOqAlnarSstPBtWCBR0tsugXx6ajfoUg== - dependencies: - esbuild "^0.8.52" - postcss "^8.2.1" - resolve "^1.19.0" - rollup "^2.38.5" - optionalDependencies: - fsevents "~2.3.1" - -vue-router@^4.0.2: - version "4.0.4" - resolved "https://registry.yarnpkg.com/vue-router/-/vue-router-4.0.4.tgz#ad9b4b7bbdad622407b4ff189b1646f48c1e9053" - integrity sha512-uN6PDEaYdU9aRO7mU+Dkr1uaY49hV3fucEDG/Vre/Qj8ct3RoJS16vcPrvKVzn69zDDjBV5b9Xw7fZA9r6b/Iw== - -vue@^3.0.5: - version "3.0.7" - resolved "https://registry.yarnpkg.com/vue/-/vue-3.0.7.tgz#8bcff51f8be570f9e4ce8cc5f52e2ab0fe3c74a1" - integrity sha512-8h4TikD+JabbMK9aRlBO4laG0AtNHRPHynxYgWZ9sq1YUPfzynd9Jeeb27XNyZytC7aCQRX9xe1+TQJuc181Tw== - dependencies: - "@vue/compiler-dom" "3.0.7" - "@vue/runtime-dom" "3.0.7" - "@vue/shared" "3.0.7" - -vuex@^4.0.0-rc.2: - version "4.0.0" - resolved "https://registry.yarnpkg.com/vuex/-/vuex-4.0.0.tgz#ac877aa76a9c45368c979471e461b520d38e6cf5" - integrity sha512-56VPujlHscP5q/e7Jlpqc40sja4vOhC4uJD1llBCWolVI8ND4+VzisDVkUMl+z5y0MpIImW6HjhNc+ZvuizgOw== - -yallist@^3.0.2: - version "3.1.1" - resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.1.1.tgz#dbb7daf9bfd8bac9ab45ebf602b8cbad0d5d08fd" - integrity sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g== - -zrender@5.0.4: - version "5.0.4" - resolved "https://registry.yarnpkg.com/zrender/-/zrender-5.0.4.tgz#89c355af908b9f64a301b38f751b7951f2c8a95a" - integrity sha512-DJpy0yrHYY5CuH6vhb9IINWbjvBUe/56J8aH86Jb7O8rRPAYZ3M2E469Qf5B3EOIfM3o3aUrO5edRQfLJ+l1Qw== - dependencies: - tslib "2.0.3"