diff --git a/.editorconfig b/.editorconfig index acf8428b..02bb57fb 100644 --- a/.editorconfig +++ b/.editorconfig @@ -1,12 +1,11 @@ # Editor configuration, see http://editorconfig.org -# 表示是最顶层的 EditorConfig 配置文件 root = true -[*] # 表示所有文件适用 -charset = utf-8 # 设置文件字符集为 utf-8 -indent_style = tab # 缩进风格(tab | space) -indent_size = 2 # 缩进大小 -end_of_line = lf # 控制换行类型(lf | cr | crlf) -trim_trailing_whitespace = true # 去除行首的任意空白字符 -insert_final_newline = true # 始终在文件末尾插入一个新行 +[*] +charset = utf-8 +indent_style = tab +indent_size = 2 +end_of_line = lf +trim_trailing_whitespace = true +insert_final_newline = true diff --git a/.env-config.ts b/.env-config.ts index bd038257..d61fb158 100644 --- a/.env-config.ts +++ b/.env-config.ts @@ -13,10 +13,10 @@ type ServiceEnv = Record< export const serviceEnv: ServiceEnv = { test: { env: 'test', - url: 'http://www.baidu.com' + url: 'http://www.baidu.com', }, prod: { env: 'prod', - url: 'http://www.baidu.com' - } + url: 'http://www.baidu.com', + }, }; diff --git a/.env.development b/.env.development index 491efa33..15468371 100644 --- a/.env.development +++ b/.env.development @@ -1 +1,2 @@ +# 是否开启打包文件大小结果分析 VITE_VISUALIZER=false diff --git a/.eslintignore b/.eslintignore index 514a20ef..f911aced 100644 --- a/.eslintignore +++ b/.eslintignore @@ -11,6 +11,6 @@ lib /docs .vscode .local +package.json components.d.ts !.env-config.ts -package.json diff --git a/.eslintrc.js b/.eslintrc.js index 96f90ce3..683c04d1 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -1,30 +1,34 @@ module.exports = { env: { browser: true, - es2021: true + es2021: true, + 'vue/setup-compiler-macros': true, }, globals: { - defineProps: 'readonly', - defineEmits: 'readonly', - defineExpose: 'readonly', - withDefaults: 'readonly', PROJECT_BUILD_TIME: 'readonly', AMap: 'readonly', BMap: 'readonly', - TMap: 'readonly' + TMap: 'readonly', }, parser: 'vue-eslint-parser', parserOptions: { ecmaVersion: 12, parser: '@typescript-eslint/parser', - sourceType: 'module' + sourceType: 'module', }, plugins: ['vue', '@typescript-eslint'], - extends: ['plugin:vue/vue3-recommended', 'airbnb-base', '@vue/typescript/recommended', 'plugin:prettier/recommended'], + extends: [ + 'airbnb-base', + 'eslint:recommended', + 'plugin:vue/vue3-recommended', + 'plugin:prettier/recommended', + '@vue/eslint-config-typescript/recommended', + '@vue/eslint-config-prettier', + '@vue/typescript/recommended', + ], rules: { 'import/extensions': 'off', 'import/no-extraneous-dependencies': 'off', - 'import/no-unresolved': 0, 'import/order': [ 'error', { @@ -34,129 +38,167 @@ module.exports = { { pattern: 'vue', group: 'external', - position: 'before' + position: 'before', }, { pattern: 'vue-router', group: 'external', - position: 'before' + position: 'before', + }, + { + pattern: 'vuex', + group: 'external', + position: 'before', }, { pattern: 'pinia', group: 'external', - position: 'before' - }, - { - pattern: 'naive-ui', - group: 'external', - position: 'before' + position: 'before', }, + // ui framework, such as "naive-ui" + // { + // pattern: 'naive-ui', + // group: 'external', + // position: 'before' + // }, { pattern: '@/config', group: 'internal', - position: 'before' + position: 'before', }, { pattern: '@/settings', group: 'internal', - position: 'before' + position: 'before', }, { pattern: '@/enum', group: 'internal', - position: 'before' + position: 'before', }, { pattern: '@/plugins', group: 'internal', - position: 'before' + position: 'before', }, { pattern: '@/layouts', group: 'internal', - position: 'before' - }, - { - pattern: '@/layouts', - group: 'internal', - position: 'before' + position: 'before', }, { pattern: '@/views', group: 'internal', - position: 'before' + position: 'before', }, { pattern: '@/components', group: 'internal', - position: 'before' + position: 'before', }, { pattern: '@/router', group: 'internal', - position: 'before' + position: 'before', }, { pattern: '@/store', group: 'internal', - position: 'before' + position: 'before', }, { pattern: '@/composables', group: 'internal', - position: 'before' + position: 'before', }, { pattern: '@/hooks', group: 'internal', - position: 'before' + position: 'before', }, { pattern: '@/service', group: 'internal', - position: 'before' + position: 'before', }, { pattern: '@/utils', group: 'internal', - position: 'before' + position: 'before', }, { pattern: '@/assets', group: 'internal', - position: 'before' + position: 'before', }, { pattern: '@/**', group: 'internal', - position: 'before' + position: 'before', }, { pattern: '@/interface', group: 'internal', - position: 'before' - } + position: 'before', + }, ], - pathGroupsExcludedImportTypes: ['vue', 'vue-router', 'pinia', 'naive-ui'] - } + pathGroupsExcludedImportTypes: [ + 'vue', + 'vue-router', + 'vuex', + 'pinia', + // 'naive-ui' + ], + }, ], - 'import/prefer-default-export': 0, - 'max-classes-per-file': 0, - 'no-shadow': 0, + 'import/no-unresolved': 'off', + 'import/prefer-default-export': 'off', + 'max-classes-per-file': 'off', + 'no-param-reassign': [ + 'error', + { + props: true, + ignorePropertyModificationsFor: ['state', 'acc', 'e'], + }, + ], + 'no-plusplus': 'off', + 'no-shadow': 'off', 'no-unused-vars': 'off', 'no-use-before-define': 'off', - 'vue/comment-directive': 0, - 'vue/multi-word-component-names': 0, - '@typescript-eslint/ban-types': 'off', - '@typescript-eslint/ban-ts-ignore': 'off', - '@typescript-eslint/explicit-function-return-type': 'off', - '@typescript-eslint/explicit-module-boundary-types': 'off', - '@typescript-eslint/no-empty-function': 'off', - '@typescript-eslint/no-explicit-any': 0, - '@typescript-eslint/no-inferrable-types': 0, - '@typescript-eslint/no-non-null-assertion': 'off', - '@typescript-eslint/no-unused-vars': ['warn', { ignoreRestSiblings: true, varsIgnorePattern: 'Ignored' }], + 'vue/multi-word-component-names': [ + 'error', + { + ignores: ['index'], + }, + ], + '@typescript-eslint/ban-types': [ + 'error', + { + types: { + '{}': { + message: 'Use object instead', + fixWith: 'object', + }, + }, + }, + ], + '@typescript-eslint/no-explicit-any': 'off', + '@typescript-eslint/no-shadow': 'error', + '@typescript-eslint/no-unused-vars': ['warn', { ignoreRestSiblings: true, varsIgnorePattern: '^_' }], '@typescript-eslint/no-use-before-define': ['error', { classes: true, functions: false, typedefs: false }], - '@typescript-eslint/no-var-requires': 'off' - } + }, + overrides: [ + { + files: ['*.vue'], + rules: { + 'no-undef': 'off', + }, + }, + { + files: ['*.html'], + rules: { + 'vue/comment-directive': 'off', + }, + }, + ], }; diff --git a/.gitignore b/.gitignore index c16790f4..e6cdcc3d 100644 --- a/.gitignore +++ b/.gitignore @@ -11,17 +11,20 @@ node_modules .DS_Store dist dist-ssr +coverage *.local +stats.html /cypress/videos/ /cypress/screenshots/ # Editor directories and files +.vscode/* +!.vscode/extensions.json +!.vscode/settings.json .idea *.suo *.ntvs* *.njsproj *.sln *.sw? - -stats.html diff --git a/.prettierrc.js b/.prettierrc.js index 4b3ba654..7de37056 100644 --- a/.prettierrc.js +++ b/.prettierrc.js @@ -1,27 +1,27 @@ -module.exports = { - printWidth: 120, // 超过最大值换行 - tabWidth: 2, // 缩进字节数 - useTabs: false, // 缩进使用tab,不使用空格 - semi: true, // 句尾添加分号 - singleQuote: true, // 使用单引号代替双引号 - proseWrap: 'preserve', // 默认值。因为使用了一些折行敏感型的渲染器(如GitHub comment)而按照markdown文本样式进行折行 - arrowParens: 'avoid', // (x) => {} 箭头函数参数只有一个时是否要有小括号。avoid:省略括号 - bracketSpacing: true, // 在对象,数组括号与文字之间加空格 "{ foo: bar }" - endOfLine: 'auto', // 结尾是 \n \r \n\r auto - eslintIntegration: false, //不让prettier使用eslint的代码格式进行校验 - htmlWhitespaceSensitivity: 'ignore', // 指定HTML文件的全局空白区域敏感度 有效选项:"css"- 遵守CSS display属性的默认值。"strict" - 空格被认为是敏感的。"ignore" - 空格被认为是不敏感的。html 中空格也会占位,影响布局,prettier 格式化的时候可能会将文本换行,造成布局错乱 - ignorePath: '.prettierignore', // 不使用prettier格式化的文件填写在项目的.prettierignore文件中 - jsxSingleQuote: false, // 在jsx中使用单引号代替双引号 - requireConfig: false, // Require a 'prettierconfig' to format prettier - stylelintIntegration: false, //不让prettier使用stylelint的代码格式进行校验 - trailingComma: 'none', // 在对象或数组最后一个元素后面是否加逗号(在ES5中加尾逗号) - tslintIntegration: false, // 不让prettier使用tslint的代码格式进行校验 +module.exports = { // https://prettier.io/docs/en/options.html + arrowParens: 'always', + bracketSameLine: false, + bracketSpacing: true, + embeddedLanguageFormatting: 'auto', + htmlWhitespaceSensitivity: 'css', + insertPragma: false, + jsxSingleQuote: false, + printWidth: 120, + proseWrap: 'preserve', + quoteProps: 'as-needed', + requirePragma: false, + semi: true, + singleQuote: true, + tabWidth: 2, + trailingComma: 'es5', + useTabs: false, + vueIndentScriptAndStyle: false, overrides: [ { files: '*.html', options: { - parser: 'html' - } - } - ] + parser: 'html', + }, + }, + ], }; diff --git a/build/define/index.ts b/build/define/index.ts index 2b7190b3..a4117dd4 100644 --- a/build/define/index.ts +++ b/build/define/index.ts @@ -4,5 +4,5 @@ import dayjs from 'dayjs'; const PROJECT_BUILD_TIME = JSON.stringify(dayjs().format('YYYY-MM-DD HH:mm:ss')); export const define = { - PROJECT_BUILD_TIME + PROJECT_BUILD_TIME, }; diff --git a/build/plugins/html.ts b/build/plugins/html.ts index 50074398..11118207 100644 --- a/build/plugins/html.ts +++ b/build/plugins/html.ts @@ -10,8 +10,8 @@ export default (config: ConfigEnv): PluginOption[] => { inject: { data: { appName: viteEnv.VITE_APP_NAME, - appTitle: viteEnv.VITE_APP_TITLE - } - } + appTitle: viteEnv.VITE_APP_TITLE, + }, + }, }); }; diff --git a/build/plugins/iconify.ts b/build/plugins/iconify.ts index a598a418..848760b2 100644 --- a/build/plugins/iconify.ts +++ b/build/plugins/iconify.ts @@ -8,14 +8,14 @@ export default (srcPath: string) => { Icons({ compiler: 'vue3', customCollections: { - custom: FileSystemIconLoader(`${srcPath}/assets/svg`) + custom: FileSystemIconLoader(`${srcPath}/assets/svg`), }, scale: 1, - defaultClass: 'inline-block' + defaultClass: 'inline-block', }), Components({ dts: false, - resolvers: [IconsResolver({ customCollections: ['custom'], componentPrefix: 'icon' })] - }) + resolvers: [IconsResolver({ customCollections: ['custom'], componentPrefix: 'icon' })], + }), ]; }; diff --git a/build/plugins/mock.ts b/build/plugins/mock.ts index 40d2e585..896e11ca 100644 --- a/build/plugins/mock.ts +++ b/build/plugins/mock.ts @@ -5,5 +5,5 @@ export default viteMockServe({ injectCode: ` import { setupMockServer } from '../mock'; setupMockServer(); - ` + `, }); diff --git a/build/plugins/visualizer.ts b/build/plugins/visualizer.ts index a250d5e7..c1682f66 100644 --- a/build/plugins/visualizer.ts +++ b/build/plugins/visualizer.ts @@ -2,5 +2,5 @@ import { visualizer } from 'rollup-plugin-visualizer'; export default visualizer({ gzipSize: true, - brotliSize: true + brotliSize: true, }); diff --git a/mock/api/auth.ts b/mock/api/auth.ts index 7bec62bc..f26817c7 100644 --- a/mock/api/auth.ts +++ b/mock/api/auth.ts @@ -2,7 +2,7 @@ import type { MockMethod } from 'vite-plugin-mock'; const token: ApiAuth.Token = { token: '__TEMP_TOKEN__', - refreshToken: '__TEMP_REFRESH_TOKEN__' + refreshToken: '__TEMP_REFRESH_TOKEN__', }; const apis: MockMethod[] = [ @@ -14,9 +14,9 @@ const apis: MockMethod[] = [ return { code: 200, message: 'ok', - data: true + data: true, }; - } + }, }, // 密码登录 { @@ -26,9 +26,9 @@ const apis: MockMethod[] = [ return { code: 200, message: 'ok', - data: token + data: token, }; - } + }, }, // 验证码登录 { @@ -38,9 +38,9 @@ const apis: MockMethod[] = [ return { code: 200, message: 'ok', - data: token + data: token, }; - } + }, }, // 获取用户信息(请求头携带token) { @@ -54,10 +54,10 @@ const apis: MockMethod[] = [ userId: '0', userName: 'Soybean', userPhone: '15170283876', - userRole: 'super' - } + userRole: 'super', + }, }; - } + }, }, { url: '/mock/testToken', @@ -67,15 +67,15 @@ const apis: MockMethod[] = [ return { code: 66666, message: 'token 失效', - data: null + data: null, }; } return { code: 200, message: 'ok', - data: true + data: true, }; - } + }, }, { url: '/mock/updateToken', @@ -84,10 +84,10 @@ const apis: MockMethod[] = [ return { code: 200, message: 'ok', - data: token + data: token, }; - } - } + }, + }, ]; export default apis; diff --git a/mock/api/route.ts b/mock/api/route.ts index f904fe3a..0214231e 100644 --- a/mock/api/route.ts +++ b/mock/api/route.ts @@ -13,8 +13,8 @@ const routes: AuthRoute.Route[] = [ meta: { title: '分析页', requiresAuth: true, - icon: 'icon-park-outline:analysis' - } + icon: 'icon-park-outline:analysis', + }, }, { name: 'dashboard_workbench', @@ -24,15 +24,15 @@ const routes: AuthRoute.Route[] = [ title: '工作台', requiresAuth: true, permissions: ['super', 'admin'], - icon: 'icon-park-outline:workbench' - } - } + icon: 'icon-park-outline:workbench', + }, + }, ], meta: { title: '仪表盘', icon: 'carbon:dashboard', - order: 1 - } + order: 1, + }, }, { name: 'document', @@ -46,8 +46,8 @@ const routes: AuthRoute.Route[] = [ meta: { title: 'vue文档', requiresAuth: true, - icon: 'mdi:vuejs' - } + icon: 'mdi:vuejs', + }, }, { name: 'document_vue-new', @@ -56,8 +56,8 @@ const routes: AuthRoute.Route[] = [ meta: { title: 'vue文档(新版)', requiresAuth: true, - icon: 'mdi:vuejs' - } + icon: 'mdi:vuejs', + }, }, { name: 'document_vite', @@ -66,8 +66,8 @@ const routes: AuthRoute.Route[] = [ meta: { title: 'vite文档', requiresAuth: true, - icon: 'simple-icons:vite' - } + icon: 'simple-icons:vite', + }, }, { name: 'document_naive', @@ -76,8 +76,8 @@ const routes: AuthRoute.Route[] = [ meta: { title: 'naive文档', requiresAuth: true, - icon: 'mdi:alpha-n-box-outline' - } + icon: 'mdi:alpha-n-box-outline', + }, }, { name: 'document_project', @@ -86,15 +86,15 @@ const routes: AuthRoute.Route[] = [ title: '项目文档(外链)', requiresAuth: true, icon: 'mdi:file-link-outline', - href: 'https://docs.soybean.pro/' - } - } + href: 'https://docs.soybean.pro/', + }, + }, ], meta: { title: '文档', icon: 'carbon:document', - order: 2 - } + order: 2, + }, }, { name: 'component', @@ -108,8 +108,8 @@ const routes: AuthRoute.Route[] = [ meta: { title: '按钮', requiresAuth: true, - icon: 'ic:baseline-radio-button-checked' - } + icon: 'ic:baseline-radio-button-checked', + }, }, { name: 'component_card', @@ -118,8 +118,8 @@ const routes: AuthRoute.Route[] = [ meta: { title: '卡片', requiresAuth: true, - icon: 'mdi:card-outline' - } + icon: 'mdi:card-outline', + }, }, { name: 'component_table', @@ -128,15 +128,15 @@ const routes: AuthRoute.Route[] = [ meta: { title: '表格', requiresAuth: true, - icon: 'mdi:table-large' - } - } + icon: 'mdi:table-large', + }, + }, ], meta: { title: '组件示例', icon: 'fluent:app-store-24-regular', - order: 3 - } + order: 3, + }, }, { name: 'plugin', @@ -150,8 +150,8 @@ const routes: AuthRoute.Route[] = [ meta: { title: '地图', requiresAuth: true, - icon: 'mdi:map' - } + icon: 'mdi:map', + }, }, { name: 'plugin_video', @@ -160,8 +160,8 @@ const routes: AuthRoute.Route[] = [ meta: { title: '视频', requiresAuth: true, - icon: 'mdi:video' - } + icon: 'mdi:video', + }, }, { name: 'plugin_editor', @@ -175,8 +175,8 @@ const routes: AuthRoute.Route[] = [ meta: { title: '富文本编辑器', requiresAuth: true, - icon: 'mdi:file-document-edit-outline' - } + icon: 'mdi:file-document-edit-outline', + }, }, { name: 'plugin_editor_markdown', @@ -185,14 +185,14 @@ const routes: AuthRoute.Route[] = [ meta: { title: 'markdown编辑器', requiresAuth: true, - icon: 'ri:markdown-line' - } - } + icon: 'ri:markdown-line', + }, + }, ], meta: { title: '编辑器', - icon: 'icon-park-outline:editor' - } + icon: 'icon-park-outline:editor', + }, }, { name: 'plugin_swiper', @@ -201,8 +201,8 @@ const routes: AuthRoute.Route[] = [ meta: { title: 'Swiper插件', requiresAuth: true, - icon: 'simple-icons:swiper' - } + icon: 'simple-icons:swiper', + }, }, { name: 'plugin_copy', @@ -211,8 +211,8 @@ const routes: AuthRoute.Route[] = [ meta: { title: '剪贴板', requiresAuth: true, - icon: 'mdi:clipboard-outline' - } + icon: 'mdi:clipboard-outline', + }, }, { name: 'plugin_icon', @@ -221,8 +221,8 @@ const routes: AuthRoute.Route[] = [ meta: { title: '图标', requiresAuth: true, - icon: 'ic:baseline-insert-emoticon' - } + icon: 'ic:baseline-insert-emoticon', + }, }, { name: 'plugin_print', @@ -231,15 +231,15 @@ const routes: AuthRoute.Route[] = [ meta: { title: '打印', requiresAuth: true, - icon: 'ic:baseline-local-printshop' - } - } + icon: 'ic:baseline-local-printshop', + }, + }, ], meta: { title: '插件示例', icon: 'clarity:plugin-line', - order: 4 - } + order: 4, + }, }, { name: 'exception', @@ -253,8 +253,8 @@ const routes: AuthRoute.Route[] = [ meta: { title: '异常页403', requiresAuth: true, - icon: 'ic:baseline-block' - } + icon: 'ic:baseline-block', + }, }, { name: 'exception_404', @@ -263,8 +263,8 @@ const routes: AuthRoute.Route[] = [ meta: { title: '异常页404', requiresAuth: true, - icon: 'ic:baseline-web-asset-off' - } + icon: 'ic:baseline-web-asset-off', + }, }, { name: 'exception_500', @@ -273,15 +273,15 @@ const routes: AuthRoute.Route[] = [ meta: { title: '异常页500', requiresAuth: true, - icon: 'ic:baseline-wifi-off' - } - } + icon: 'ic:baseline-wifi-off', + }, + }, ], meta: { title: '异常页', icon: 'ant-design:exception-outlined', - order: 5 - } + order: 5, + }, }, { name: 'multi-menu', @@ -300,8 +300,8 @@ const routes: AuthRoute.Route[] = [ meta: { title: '二级菜单', requiresAuth: true, - icon: 'ic:outline-menu' - } + icon: 'ic:outline-menu', + }, }, { name: 'multi-menu_first_second-new', @@ -315,27 +315,27 @@ const routes: AuthRoute.Route[] = [ meta: { title: '三级菜单', requiresAuth: true, - icon: 'ic:outline-menu' - } - } + icon: 'ic:outline-menu', + }, + }, ], meta: { title: '二级菜单(有子菜单)', - icon: 'ic:outline-menu' - } - } + icon: 'ic:outline-menu', + }, + }, ], meta: { title: '一级菜单', - icon: 'ic:outline-menu' - } - } + icon: 'ic:outline-menu', + }, + }, ], meta: { title: '多级菜单', icon: 'carbon:menu', - order: 6 - } + order: 6, + }, }, { name: 'about', @@ -347,9 +347,9 @@ const routes: AuthRoute.Route[] = [ singleLayout: 'basic', permissions: ['super', 'admin', 'test'], icon: 'fluent:book-information-24-regular', - order: 7 - } - } + order: 7, + }, + }, ]; function dataMiddleware(data: AuthRoute.Route[]): ApiRoute.Route { @@ -361,7 +361,7 @@ function dataMiddleware(data: AuthRoute.Route[]): ApiRoute.Route { return { routes: sortRoutes(data), - home: routeHomeName + home: routeHomeName, }; } @@ -373,10 +373,10 @@ const apis: MockMethod[] = [ return { code: 200, message: 'ok', - data: dataMiddleware(routes) + data: dataMiddleware(routes), }; - } - } + }, + }, ]; export default apis; diff --git a/package.json b/package.json index c52cf42e..713daeda 100644 --- a/package.json +++ b/package.json @@ -4,16 +4,16 @@ "scripts": { "dev": "cross-env VITE_HTTP_ENV=test vite", "dev:prod": "cross-env VITE_HTTP_ENV=prod vite", - "typecheck": "vue-tsc --noEmit", "build": "npm run typecheck && cross-env VITE_HTTP_ENV=prod vite build", "build:test": "npm run typecheck && cross-env VITE_HTTP_ENV=test vite build", "build:vercel": "cross-env VITE_HASH_ROUTE=true vite build", "preview": "vite preview --port 5050", - "release": "standard-version", - "changelog": "conventional-changelog -p angular -i CHANGELOG.md -s -r 0 && git add CHANGELOG.md", - "lint": "eslint --fix ./ --ext .vue,.js,jsx,.ts,tsx", + "typecheck": "vue-tsc --noEmit", + "lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore", "prepare": "husky install", - "postinstall": "patch-package" + "postinstall": "patch-package", + "release": "standard-version", + "changelog": "conventional-changelog -p angular -i CHANGELOG.md -s -r 0 && git add CHANGELOG.md" }, "lint-staged": { "*.{vue,js,jsx,ts,tsx}": "eslint --fix" @@ -24,17 +24,17 @@ } }, "dependencies": { - "@antv/g2plot": "^2.4.9", + "@antv/g2plot": "^2.4.10", "@better-scroll/core": "^2.4.2", - "@vueuse/core": "^7.7.1", - "axios": "^0.26.0", + "@vueuse/core": "^8.0.0", + "axios": "^0.26.1", "clipboard": "^2.0.10", "colord": "^2.9.2", "crypto-js": "^4.1.1", "dayjs": "^1.10.8", "form-data": "^4.0.0", "lodash-es": "^4.17.21", - "naive-ui": "^2.26.0", + "naive-ui": "^2.26.4", "pinia": "^2.0.11", "print-js": "^1.6.0", "qs": "^6.10.3", @@ -44,7 +44,7 @@ "ua-parser-js": "^1.0.2", "vditor": "^3.8.12", "vue": "^3.2.31", - "vue-router": "^4.0.13", + "vue-router": "^4.0.14", "wangeditor": "^4.7.12", "xgplayer": "^2.31.4" }, @@ -52,15 +52,15 @@ "@amap/amap-jsapi-types": "^0.0.8", "@commitlint/cli": "^16.2.1", "@commitlint/config-conventional": "^16.2.1", - "@iconify/json": "^2.1.11", + "@iconify/json": "^2.1.14", "@iconify/vue": "^3.1.4", "@types/bmapgl": "^0.0.5", "@types/crypto-js": "^4.1.1", "@types/node": "^17.0.21", "@types/qs": "^6.9.7", "@types/ua-parser-js": "^0.7.36", - "@typescript-eslint/eslint-plugin": "^5.13.0", - "@typescript-eslint/parser": "^5.13.0", + "@typescript-eslint/eslint-plugin": "^5.14.0", + "@typescript-eslint/parser": "^5.14.0", "@vitejs/plugin-vue": "^2.2.4", "@vue/eslint-config-prettier": "^7.0.0", "@vue/eslint-config-typescript": "^10.0.0", @@ -69,7 +69,7 @@ "cross-env": "^7.0.3", "cz-conventional-changelog": "^3.3.0", "cz-customizable": "^6.3.0", - "eslint": "^8.10.0", + "eslint": "^8.11.0", "eslint-config-airbnb-base": "^15.0.0", "eslint-config-prettier": "^8.5.0", "eslint-plugin-import": "^2.25.4", @@ -83,9 +83,9 @@ "prettier": "^2.5.1", "rollup-plugin-visualizer": "^5.6.0", "sass": "^1.49.9", - "typescript": "~4.5.5", - "unplugin-icons": "^0.13.2", - "unplugin-vue-components": "^0.17.21", + "typescript": "~4.6.2", + "unplugin-icons": "^0.13.3", + "unplugin-vue-components": "^0.18.0", "vite": "2.8.6", "vite-plugin-html": "^3.1.0", "vite-plugin-mock": "^2.9.6", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 0ea7c0db..2eab7f21 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -2,25 +2,25 @@ lockfileVersion: 5.3 specifiers: '@amap/amap-jsapi-types': ^0.0.8 - '@antv/g2plot': ^2.4.9 + '@antv/g2plot': ^2.4.10 '@better-scroll/core': ^2.4.2 '@commitlint/cli': ^16.2.1 '@commitlint/config-conventional': ^16.2.1 - '@iconify/json': ^2.1.11 + '@iconify/json': ^2.1.14 '@iconify/vue': ^3.1.4 '@types/bmapgl': ^0.0.5 '@types/crypto-js': ^4.1.1 '@types/node': ^17.0.21 '@types/qs': ^6.9.7 '@types/ua-parser-js': ^0.7.36 - '@typescript-eslint/eslint-plugin': ^5.13.0 - '@typescript-eslint/parser': ^5.13.0 + '@typescript-eslint/eslint-plugin': ^5.14.0 + '@typescript-eslint/parser': ^5.14.0 '@vitejs/plugin-vue': ^2.2.4 '@vue/eslint-config-prettier': ^7.0.0 '@vue/eslint-config-typescript': ^10.0.0 '@vue/tsconfig': ^0.1.3 - '@vueuse/core': ^7.7.1 - axios: ^0.26.0 + '@vueuse/core': ^8.0.0 + axios: ^0.26.1 clipboard: ^2.0.10 colord: ^2.9.2 commitizen: ^4.2.4 @@ -29,7 +29,7 @@ specifiers: cz-conventional-changelog: ^3.3.0 cz-customizable: ^6.3.0 dayjs: ^1.10.8 - eslint: ^8.10.0 + eslint: ^8.11.0 eslint-config-airbnb-base: ^15.0.0 eslint-config-prettier: ^8.5.0 eslint-plugin-import: ^2.25.4 @@ -40,7 +40,7 @@ specifiers: lint-staged: ^12.3.5 lodash-es: ^4.17.21 mockjs: ^1.1.0 - naive-ui: ^2.26.0 + naive-ui: ^2.26.4 patch-package: ^6.4.7 pinia: ^2.0.11 postinstall-postinstall: ^2.1.0 @@ -52,17 +52,17 @@ specifiers: soybean-admin-layout: ^1.0.4 soybean-admin-tab: ^1.2.3 swiper: ^8.0.7 - typescript: ~4.5.5 + typescript: ~4.6.2 ua-parser-js: ^1.0.2 - unplugin-icons: ^0.13.2 - unplugin-vue-components: ^0.17.21 + unplugin-icons: ^0.13.3 + unplugin-vue-components: ^0.18.0 vditor: ^3.8.12 vite: 2.8.6 vite-plugin-html: ^3.1.0 vite-plugin-mock: ^2.9.6 vite-plugin-windicss: ^1.8.3 vue: ^3.2.31 - vue-router: ^4.0.13 + vue-router: ^4.0.14 vue-tsc: ^0.32.1 vueuc: ^0.4.27 wangeditor: ^4.7.12 @@ -70,18 +70,18 @@ specifiers: xgplayer: ^2.31.4 dependencies: - '@antv/g2plot': 2.4.9 + '@antv/g2plot': 2.4.10 '@better-scroll/core': registry.nlark.com/@better-scroll/core/2.4.2 - '@vueuse/core': 7.7.1_vue@3.2.31 - axios: registry.npmmirror.com/axios/0.26.0 + '@vueuse/core': 8.0.0_vue@3.2.31 + axios: 0.26.1 clipboard: registry.npmmirror.com/clipboard/2.0.10 colord: registry.npmmirror.com/colord/2.9.2 crypto-js: registry.npmmirror.com/crypto-js/4.1.1 dayjs: 1.10.8 form-data: registry.nlark.com/form-data/4.0.0 lodash-es: registry.npmmirror.com/lodash-es/4.17.21 - naive-ui: 2.26.0_vue@3.2.31 - pinia: registry.npmmirror.com/pinia/2.0.11_typescript@4.5.5+vue@3.2.31 + naive-ui: 2.26.4_vue@3.2.31 + pinia: registry.npmmirror.com/pinia/2.0.11_typescript@4.6.2+vue@3.2.31 print-js: registry.npmmirror.com/print-js/1.6.0 qs: registry.npmmirror.com/qs/6.10.3 soybean-admin-layout: 1.0.4_vue@3.2.31 @@ -90,7 +90,7 @@ dependencies: ua-parser-js: registry.npmmirror.com/ua-parser-js/1.0.2 vditor: 3.8.12 vue: registry.npmmirror.com/vue/3.2.31 - vue-router: 4.0.13_vue@3.2.31 + vue-router: 4.0.14_vue@3.2.31 wangeditor: 4.7.12 xgplayer: registry.npmmirror.com/xgplayer/2.31.4 @@ -98,29 +98,29 @@ devDependencies: '@amap/amap-jsapi-types': registry.npmmirror.com/@amap/amap-jsapi-types/0.0.8 '@commitlint/cli': registry.npmmirror.com/@commitlint/cli/16.2.1 '@commitlint/config-conventional': registry.npmmirror.com/@commitlint/config-conventional/16.2.1 - '@iconify/json': 2.1.11 + '@iconify/json': 2.1.14 '@iconify/vue': 3.1.4_vue@3.2.31 '@types/bmapgl': registry.npmmirror.com/@types/bmapgl/0.0.5 '@types/crypto-js': registry.npmmirror.com/@types/crypto-js/4.1.1 '@types/node': 17.0.21 '@types/qs': registry.npmmirror.com/@types/qs/6.9.7 '@types/ua-parser-js': registry.npmmirror.com/@types/ua-parser-js/0.7.36 - '@typescript-eslint/eslint-plugin': 5.13.0_1e08a597a4fb107867dcbe827a94038a - '@typescript-eslint/parser': 5.13.0_eslint@8.10.0+typescript@4.5.5 + '@typescript-eslint/eslint-plugin': 5.14.0_ace6f9e7722b813e21eaf2dc993bc413 + '@typescript-eslint/parser': 5.14.0_eslint@8.11.0+typescript@4.6.2 '@vitejs/plugin-vue': 2.2.4_vite@2.8.6+vue@3.2.31 - '@vue/eslint-config-prettier': registry.npmmirror.com/@vue/eslint-config-prettier/7.0.0_eslint@8.10.0+prettier@2.5.1 - '@vue/eslint-config-typescript': registry.npmmirror.com/@vue/eslint-config-typescript/10.0.0_6bae48b99b40de9ce3e67c9c629a2961 + '@vue/eslint-config-prettier': registry.npmmirror.com/@vue/eslint-config-prettier/7.0.0_eslint@8.11.0+prettier@2.5.1 + '@vue/eslint-config-typescript': registry.npmmirror.com/@vue/eslint-config-typescript/10.0.0_5e58415d4c9ab0c3da8935a9b8bb8c26 '@vue/tsconfig': 0.1.3_@types+node@17.0.21 commitizen: registry.npmmirror.com/commitizen/4.2.4 cross-env: registry.nlark.com/cross-env/7.0.3 cz-conventional-changelog: registry.nlark.com/cz-conventional-changelog/3.3.0 cz-customizable: registry.npmmirror.com/cz-customizable/6.3.0 - eslint: 8.10.0 - eslint-config-airbnb-base: registry.npmmirror.com/eslint-config-airbnb-base/15.0.0_8b406960a2a06af75ddac353adbd0cfd - eslint-config-prettier: 8.5.0_eslint@8.10.0 - eslint-plugin-import: registry.npmmirror.com/eslint-plugin-import/2.25.4_eslint@8.10.0 - eslint-plugin-prettier: registry.npmmirror.com/eslint-plugin-prettier/4.0.0_f3d13a703a9c1079e3d1af6044603beb - eslint-plugin-vue: registry.npmmirror.com/eslint-plugin-vue/8.5.0_eslint@8.10.0 + eslint: 8.11.0 + eslint-config-airbnb-base: registry.npmmirror.com/eslint-config-airbnb-base/15.0.0_fe22d862ffeecaee86c93a006d59e41e + eslint-config-prettier: 8.5.0_eslint@8.11.0 + eslint-plugin-import: registry.npmmirror.com/eslint-plugin-import/2.25.4_eslint@8.11.0 + eslint-plugin-prettier: registry.npmmirror.com/eslint-plugin-prettier/4.0.0_c9d5adccfd1d43a8805a302169f6a967 + eslint-plugin-vue: registry.npmmirror.com/eslint-plugin-vue/8.5.0_eslint@8.11.0 husky: registry.npmmirror.com/husky/7.0.4 lint-staged: 12.3.5 mockjs: registry.npmmirror.com/mockjs/1.1.0 @@ -129,21 +129,28 @@ devDependencies: prettier: registry.npmmirror.com/prettier/2.5.1 rollup-plugin-visualizer: 5.6.0 sass: 1.49.9 - typescript: 4.5.5 - unplugin-icons: registry.npmmirror.com/unplugin-icons/0.13.2_vite@2.8.6 - unplugin-vue-components: 0.17.21_vite@2.8.6+vue@3.2.31 + typescript: 4.6.2 + unplugin-icons: 0.13.3_vite@2.8.6 + unplugin-vue-components: 0.18.0_vite@2.8.6+vue@3.2.31 vite: 2.8.6_sass@1.49.9 vite-plugin-html: 3.1.0_vite@2.8.6 vite-plugin-mock: registry.npmmirror.com/vite-plugin-mock/2.9.6_mockjs@1.1.0+vite@2.8.6 vite-plugin-windicss: 1.8.3_vite@2.8.6 - vue-tsc: 0.32.1_typescript@4.5.5 + vue-tsc: 0.32.1_typescript@4.6.2 vueuc: 0.4.27_vue@3.2.31 windicss: 3.5.1 packages: - /@antfu/utils/0.4.0: - resolution: {integrity: sha512-gqkpvjkgFUu+s3kP+Ly33OKpo5zvVY3FDFhv5BIb98SncS3KD6DNxPfNDjwHIoyXbz1leWo1j8DtRLZ1D2Jv+Q==} + /@antfu/install-pkg/0.1.0: + resolution: {integrity: sha512-VaIJd3d1o7irZfK1U0nvBsHMyjkuyMP3HKYVV53z8DKyulkHKmjhhtccXO51WSPeeSHIeoJEoNOKavYpS7jkZw==} + dependencies: + execa: 5.1.1 + find-up: 5.0.0 + dev: true + + /@antfu/utils/0.3.0: + resolution: {integrity: sha512-UU8TLr/EoXdg7OjMp0h9oDoIAVr+Z/oW9cpOxQQyrsz6Qzd2ms/1CdWx8fl2OQdFpxGmq5Vc4TwfLHId6nAZjA==} dependencies: '@types/throttle-debounce': 2.1.0 dev: true @@ -287,8 +294,8 @@ packages: tslib: 2.3.1 dev: false - /@antv/g2plot/2.4.9: - resolution: {integrity: sha512-Q0DYDfmJZjHXPQLiMo+59spJvIAsFyTMfoxsS4FzCc8yd7OhjoPsKfJYu/1BhG9Uls80bdwUKy3fCEzb0zpjhA==} + /@antv/g2plot/2.4.10: + resolution: {integrity: sha512-6yZdRCI+ToGaa1iGAkFnClZ3wugrspI1AKibt7wH5l8kU6iwYwrVwnEl4W3lTm8mWpgobnXF98hmxdKCeTNCTg==} dependencies: '@antv/event-emitter': 0.1.2 '@antv/g2': 4.1.37 @@ -429,15 +436,15 @@ packages: /@emotion/hash/0.8.0: resolution: {integrity: sha512-kBJtf7PH6aWwZ6fka3zQ0p6SBYzx4fl1LoZXE2RrnYST9Xljm7WfKJrU4g/Xr3Beg72MLrp1AWNUmuYJTL7Cow==} - /@eslint/eslintrc/1.2.0: - resolution: {integrity: sha512-igm9SjJHNEJRiUnecP/1R5T3wKLEJ7pL6e2P+GUSfCd0dGjPYYZve08uzw8L2J8foVHFz+NGu12JxRcU2gGo6w==} + /@eslint/eslintrc/1.2.1: + resolution: {integrity: sha512-bxvbYnBPN1Gibwyp6NrpnFzA3YtRL3BBAyEAFVIpNTm2Rn4Vy87GA5M4aSn3InRrlsbX5N0GW7XIx+U4SAEKdQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dependencies: ajv: 6.12.6 debug: 4.3.3 espree: 9.3.1 globals: 13.12.0 - ignore: 4.0.6 + ignore: 5.2.0 import-fresh: 3.3.0 js-yaml: 4.1.0 minimatch: 3.0.4 @@ -461,8 +468,8 @@ packages: resolution: {integrity: sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==} dev: true - /@iconify/json/2.1.11: - resolution: {integrity: sha512-j1V7051cV4sN5T/tjxt7BHJ7Fn3YaLNa57M2I3KCaSlHayTxHKEE8ftYLjbqoAVIBbRBuHnLofDw9tlPlOjpaw==} + /@iconify/json/2.1.14: + resolution: {integrity: sha512-3I+eMDfrofM64GfUMtH1P864u3H/iAMixmgmVJyWk45gIXJgRGVUqSAd+N2eM2/LNAE4SaGoPuipPAewVpUAEw==} dependencies: '@iconify/types': 1.0.12 pathe: 0.0.2 @@ -472,6 +479,19 @@ packages: resolution: {integrity: sha512-6er6wSGF3hgc1JEZqiGpg21CTCjHBYOUwqLmb2Idzkjiw6ogalGP0ZMLVutCzah+0WB4yP+Zd2oVPN8jvJ+Ftg==} dev: true + /@iconify/utils/1.0.23: + resolution: {integrity: sha512-Ktdmpe4mkMXQAnnDUz3s6s5aY/BeVPwHC1d5IhG1bgrWVNWFQNUj8cQPMbHpNCSD9MRC5yGxm9/PGPpOWGJLAg==} + dependencies: + '@antfu/install-pkg': 0.1.0 + '@antfu/utils': 0.3.0 + '@iconify/types': 1.0.12 + debug: 4.3.3 + kolorist: 1.5.1 + local-pkg: 0.4.1 + transitivePeerDependencies: + - supports-color + dev: true + /@iconify/vue/3.1.4_vue@3.2.31: resolution: {integrity: sha512-oJm0VPl1fhlsbBX9tBeAbtmZ5iHCxCkVQdCi81lxdA3cqc9yqBlCloqObX93/YWNM5N8j/j0Efk6iSwsihOoNA==} peerDependencies: @@ -519,6 +539,14 @@ packages: picomatch: 2.3.0 dev: true + /@rollup/pluginutils/4.2.0: + resolution: {integrity: sha512-2WUyJNRkyH5p487pGnn4tWAsxhEFKN/pT8CMgHshd5H+IXkOnKvKZwsz5ZWz+YCXkleZRAU5kwbfgF8CPfDRqA==} + engines: {node: '>= 8.0.0'} + dependencies: + estree-walker: 2.0.2 + picomatch: 2.3.0 + dev: true + /@types/d3-timer/2.0.1: resolution: {integrity: sha512-TF8aoF5cHcLO7W7403blM7L1T+6NF3XMyN3fxyUolq2uOcFeicG/khQg/dGxiCJWoAcmYulYN7LYSRKO54IXaA==} dev: false @@ -574,8 +602,8 @@ packages: dependencies: '@types/yargs-parser': 20.2.1 - /@typescript-eslint/eslint-plugin/5.13.0_1e08a597a4fb107867dcbe827a94038a: - resolution: {integrity: sha512-vLktb2Uec81fxm/cfz2Hd6QaWOs8qdmVAZXLdOBX6JFJDhf6oDZpMzZ4/LZ6SFM/5DgDcxIMIvy3F+O9yZBuiQ==} + /@typescript-eslint/eslint-plugin/5.14.0_ace6f9e7722b813e21eaf2dc993bc413: + resolution: {integrity: sha512-ir0wYI4FfFUDfLcuwKzIH7sMVA+db7WYen47iRSaCGl+HMAZI9fpBwfDo45ZALD3A45ZGyHWDNLhbg8tZrMX4w==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: '@typescript-eslint/parser': ^5.0.0 @@ -585,24 +613,24 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/parser': 5.13.0_eslint@8.10.0+typescript@4.5.5 - '@typescript-eslint/scope-manager': 5.13.0 - '@typescript-eslint/type-utils': 5.13.0_eslint@8.10.0+typescript@4.5.5 - '@typescript-eslint/utils': 5.13.0_eslint@8.10.0+typescript@4.5.5 + '@typescript-eslint/parser': 5.14.0_eslint@8.11.0+typescript@4.6.2 + '@typescript-eslint/scope-manager': 5.14.0 + '@typescript-eslint/type-utils': 5.14.0_eslint@8.11.0+typescript@4.6.2 + '@typescript-eslint/utils': 5.14.0_eslint@8.11.0+typescript@4.6.2 debug: 4.3.3 - eslint: 8.10.0 + eslint: 8.11.0 functional-red-black-tree: 1.0.1 ignore: 5.2.0 regexpp: 3.2.0 semver: 7.3.5 - tsutils: 3.21.0_typescript@4.5.5 - typescript: 4.5.5 + tsutils: 3.21.0_typescript@4.6.2 + typescript: 4.6.2 transitivePeerDependencies: - supports-color dev: true - /@typescript-eslint/parser/5.13.0_eslint@8.10.0+typescript@4.5.5: - resolution: {integrity: sha512-GdrU4GvBE29tm2RqWOM0P5QfCtgCyN4hXICj/X9ibKED16136l9ZpoJvCL5pSKtmJzA+NRDzQ312wWMejCVVfg==} + /@typescript-eslint/parser/5.14.0_eslint@8.11.0+typescript@4.6.2: + resolution: {integrity: sha512-aHJN8/FuIy1Zvqk4U/gcO/fxeMKyoSv/rS46UXMXOJKVsLQ+iYPuXNbpbH7cBLcpSbmyyFbwrniLx5+kutu1pw==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 @@ -611,26 +639,26 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/scope-manager': 5.13.0 - '@typescript-eslint/types': 5.13.0 - '@typescript-eslint/typescript-estree': 5.13.0_typescript@4.5.5 + '@typescript-eslint/scope-manager': 5.14.0 + '@typescript-eslint/types': 5.14.0 + '@typescript-eslint/typescript-estree': 5.14.0_typescript@4.6.2 debug: 4.3.3 - eslint: 8.10.0 - typescript: 4.5.5 + eslint: 8.11.0 + typescript: 4.6.2 transitivePeerDependencies: - supports-color dev: true - /@typescript-eslint/scope-manager/5.13.0: - resolution: {integrity: sha512-T4N8UvKYDSfVYdmJq7g2IPJYCRzwtp74KyDZytkR4OL3NRupvswvmJQJ4CX5tDSurW2cvCc1Ia1qM7d0jpa7IA==} + /@typescript-eslint/scope-manager/5.14.0: + resolution: {integrity: sha512-LazdcMlGnv+xUc5R4qIlqH0OWARyl2kaP8pVCS39qSL3Pd1F7mI10DbdXeARcE62sVQE4fHNvEqMWsypWO+yEw==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dependencies: - '@typescript-eslint/types': 5.13.0 - '@typescript-eslint/visitor-keys': 5.13.0 + '@typescript-eslint/types': 5.14.0 + '@typescript-eslint/visitor-keys': 5.14.0 dev: true - /@typescript-eslint/type-utils/5.13.0_eslint@8.10.0+typescript@4.5.5: - resolution: {integrity: sha512-/nz7qFizaBM1SuqAKb7GLkcNn2buRdDgZraXlkhz+vUGiN1NZ9LzkA595tHHeduAiS2MsHqMNhE2zNzGdw43Yg==} + /@typescript-eslint/type-utils/5.14.0_eslint@8.11.0+typescript@4.6.2: + resolution: {integrity: sha512-d4PTJxsqaUpv8iERTDSQBKUCV7Q5yyXjqXUl3XF7Sd9ogNLuKLkxz82qxokqQ4jXdTPZudWpmNtr/JjbbvUixw==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: '*' @@ -639,22 +667,22 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/utils': 5.13.0_eslint@8.10.0+typescript@4.5.5 + '@typescript-eslint/utils': 5.14.0_eslint@8.11.0+typescript@4.6.2 debug: 4.3.3 - eslint: 8.10.0 - tsutils: 3.21.0_typescript@4.5.5 - typescript: 4.5.5 + eslint: 8.11.0 + tsutils: 3.21.0_typescript@4.6.2 + typescript: 4.6.2 transitivePeerDependencies: - supports-color dev: true - /@typescript-eslint/types/5.13.0: - resolution: {integrity: sha512-LmE/KO6DUy0nFY/OoQU0XelnmDt+V8lPQhh8MOVa7Y5k2gGRd6U9Kp3wAjhB4OHg57tUO0nOnwYQhRRyEAyOyg==} + /@typescript-eslint/types/5.14.0: + resolution: {integrity: sha512-BR6Y9eE9360LNnW3eEUqAg6HxS9Q35kSIs4rp4vNHRdfg0s+/PgHgskvu5DFTM7G5VKAVjuyaN476LCPrdA7Mw==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dev: true - /@typescript-eslint/typescript-estree/5.13.0_typescript@4.5.5: - resolution: {integrity: sha512-Q9cQow0DeLjnp5DuEDjLZ6JIkwGx3oYZe+BfcNuw/POhtpcxMTy18Icl6BJqTSd+3ftsrfuVb7mNHRZf7xiaNA==} + /@typescript-eslint/typescript-estree/5.14.0_typescript@4.6.2: + resolution: {integrity: sha512-QGnxvROrCVtLQ1724GLTHBTR0lZVu13izOp9njRvMkCBgWX26PKvmMP8k82nmXBRD3DQcFFq2oj3cKDwr0FaUA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: typescript: '*' @@ -662,41 +690,41 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/types': 5.13.0 - '@typescript-eslint/visitor-keys': 5.13.0 + '@typescript-eslint/types': 5.14.0 + '@typescript-eslint/visitor-keys': 5.14.0 debug: 4.3.3 globby: 11.0.4 is-glob: 4.0.3 semver: 7.3.5 - tsutils: 3.21.0_typescript@4.5.5 - typescript: 4.5.5 + tsutils: 3.21.0_typescript@4.6.2 + typescript: 4.6.2 transitivePeerDependencies: - supports-color dev: true - /@typescript-eslint/utils/5.13.0_eslint@8.10.0+typescript@4.5.5: - resolution: {integrity: sha512-+9oHlPWYNl6AwwoEt5TQryEHwiKRVjz7Vk6kaBeD3/kwHE5YqTGHtm/JZY8Bo9ITOeKutFaXnBlMgSATMJALUQ==} + /@typescript-eslint/utils/5.14.0_eslint@8.11.0+typescript@4.6.2: + resolution: {integrity: sha512-EHwlII5mvUA0UsKYnVzySb/5EE/t03duUTweVy8Zqt3UQXBrpEVY144OTceFKaOe4xQXZJrkptCf7PjEBeGK4w==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 dependencies: '@types/json-schema': 7.0.9 - '@typescript-eslint/scope-manager': 5.13.0 - '@typescript-eslint/types': 5.13.0 - '@typescript-eslint/typescript-estree': 5.13.0_typescript@4.5.5 - eslint: 8.10.0 + '@typescript-eslint/scope-manager': 5.14.0 + '@typescript-eslint/types': 5.14.0 + '@typescript-eslint/typescript-estree': 5.14.0_typescript@4.6.2 + eslint: 8.11.0 eslint-scope: 5.1.1 - eslint-utils: 3.0.0_eslint@8.10.0 + eslint-utils: 3.0.0_eslint@8.11.0 transitivePeerDependencies: - supports-color - typescript dev: true - /@typescript-eslint/visitor-keys/5.13.0: - resolution: {integrity: sha512-HLKEAS/qA1V7d9EzcpLFykTePmOQqOFim8oCvhY3pZgQ8Hi38hYpHd9e5GN6nQBFQNecNhws5wkS9Y5XIO0s/g==} + /@typescript-eslint/visitor-keys/5.14.0: + resolution: {integrity: sha512-yL0XxfzR94UEkjBqyymMLgCBdojzEuy/eim7N9/RIcTNxpJudAcqsU8eRyfzBbcEzGoPWfdM3AGak3cN08WOIw==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dependencies: - '@typescript-eslint/types': 5.13.0 + '@typescript-eslint/types': 5.14.0 eslint-visitor-keys: 3.3.0 dev: true @@ -813,8 +841,8 @@ packages: '@types/node': 17.0.21 dev: true - /@vueuse/core/7.7.1_vue@3.2.31: - resolution: {integrity: sha512-PRRgbATMpoeUmkCEBtUeJgOwtew8s+4UsEd+Pm7MhkjL2ihCNrSqxNVtM6NFE4uP2sWnkGcZpCjPuNSxowJ1Ow==} + /@vueuse/core/8.0.0_vue@3.2.31: + resolution: {integrity: sha512-CU8oQhTaAQ4+9IlEHnaGk88qQ2fSvALHixWZhfyA2j18G42XeyJz3V0FmnBMWZUwd7VRSHJZFbGziZ6o5npNow==} peerDependencies: '@vue/composition-api': ^1.1.0 vue: ^2.6.0 || ^3.2.0 @@ -824,13 +852,18 @@ packages: vue: optional: true dependencies: - '@vueuse/shared': 7.7.1_vue@3.2.31 + '@vueuse/metadata': 8.0.0 + '@vueuse/shared': 8.0.0_vue@3.2.31 vue: registry.npmmirror.com/vue/3.2.31 vue-demi: 0.12.1_vue@3.2.31 dev: false - /@vueuse/shared/7.7.1_vue@3.2.31: - resolution: {integrity: sha512-rN2qd22AUl7VdBxihagWyhUNHCyVk9IpvBTTfHoLH9G7rGE552X1f+zeCfehuno0zXif13jPw+icW/wn2a0rnQ==} + /@vueuse/metadata/8.0.0: + resolution: {integrity: sha512-23R9pqgfJnfmUnGCOtaDkwaNYEAO7N6whvaAFAs5D5xHXgqAj+z/tLhwQzSJw/ZzJGUb8W5L+VgP9S7SL35riw==} + dev: false + + /@vueuse/shared/8.0.0_vue@3.2.31: + resolution: {integrity: sha512-HUIFZ5Vc3aGvIzDQJJhg2+Ok5xvNuwxoz5HrOr/M765wlj357WiMYzhU2XGljL6IcmK29SP/1Jb4Fra7A4PBCw==} peerDependencies: '@vue/composition-api': ^1.1.0 vue: ^2.6.0 || ^3.2.0 @@ -1005,6 +1038,14 @@ packages: resolution: {integrity: sha1-rqdNXmHB+JlhO/ZL2mbUx48v0X0=} dev: true + /axios/0.26.1: + resolution: {integrity: sha512-fPwcX4EvnSHuInCMItEhAGnaSEXRBjtzh9fOtsE6E1G6p7vl7edEeZe11QHf18+6+9gR5PbKV/sGKNaD8YaMeA==} + dependencies: + follow-redirects: 1.14.8 + transitivePeerDependencies: + - debug + dev: false + /babel-walk/3.0.0-canary-5: resolution: {integrity: sha512-GAwkz0AihzY5bkwIY5QDR+LvsRQgB/B+1foMPvi0FZPMl5fjD7ICiznUiBdLYMH1QYe6vqu4gWYytZOccLouFw==} engines: {node: '>= 10.0.0'} @@ -1030,6 +1071,12 @@ packages: balanced-match: 1.0.2 concat-map: 0.0.1 + /brace-expansion/2.0.1: + resolution: {integrity: sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==} + dependencies: + balanced-match: 1.0.2 + dev: true + /braces/3.0.2: resolution: {integrity: sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==} engines: {node: '>=8'} @@ -1088,7 +1135,7 @@ packages: engines: {node: '>=4'} dependencies: ansi-styles: 3.2.1 - escape-string-regexp: registry.npmmirror.com/escape-string-regexp/1.0.5 + escape-string-regexp: 1.0.5 supports-color: 5.5.0 dev: true @@ -1120,6 +1167,21 @@ packages: fsevents: 2.3.2 dev: true + /chokidar/3.5.3: + resolution: {integrity: sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==} + engines: {node: '>= 8.10.0'} + dependencies: + anymatch: 3.1.2 + braces: 3.0.2 + glob-parent: 5.1.2 + is-binary-path: 2.1.0 + is-glob: 4.0.3 + normalize-path: 3.0.0 + readdirp: 3.6.0 + optionalDependencies: + fsevents: 2.3.2 + dev: true + /clean-css/5.2.4: resolution: {integrity: sha512-nKseG8wCzEuji/4yrgM/5cthL9oTDc5UOQyFMvW/Q53oP6gLH690o1NbuTh6Y18nujr7BxlsFuS7gXLnLzKJGg==} engines: {node: '>= 10.0'} @@ -1285,8 +1347,8 @@ packages: resolution: {integrity: sha512-B1JDm0XDaQC+uvo4DT79H0XmBskgS3l6Ve+1SBCfxgmtIb1AVrPIoqd+nPSv+loMX8szQ0sVUhGngL7D5QPiXw==} dev: false - /date-fns-tz/1.2.2_date-fns@2.28.0: - resolution: {integrity: sha512-vWtn44eEqnLbkACb7T5G5gPgKR4nY8NkNMOCyoY49NsRGHrcDmY2aysCyzDeA+u+vcDBn/w6nQqEDyouRs4m8w==} + /date-fns-tz/1.3.0_date-fns@2.28.0: + resolution: {integrity: sha512-r6ye6PmGEvkF467/41qzU71oGwv9kHTnV3vtSZdyV6VThwPID47ZH7FtR7zQWrhgOUWkYySm2ems2w6ZfNUqoA==} peerDependencies: date-fns: '>=2.0.0' dependencies: @@ -1305,7 +1367,7 @@ packages: /debug/2.6.9: resolution: {integrity: sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==} dependencies: - ms: registry.npmmirror.com/ms/2.0.0 + ms: 2.0.0 dev: true /debug/4.3.3: @@ -1735,13 +1797,13 @@ packages: engines: {node: '>=10'} dev: true - /eslint-config-prettier/8.5.0_eslint@8.10.0: + /eslint-config-prettier/8.5.0_eslint@8.11.0: resolution: {integrity: sha512-obmWKLUNCnhtQRKc+tmnYuQl0pFU1ibYJQ5BGhTVB08bHe9wC8qUeG7c08dj9XX+AuPj1YSGSQIHl1pnDHZR0Q==} hasBin: true peerDependencies: eslint: '>=7.0.0' dependencies: - eslint: 8.10.0 + eslint: 8.11.0 dev: true /eslint-scope/5.1.1: @@ -1768,13 +1830,13 @@ packages: estraverse: 5.3.0 dev: true - /eslint-utils/3.0.0_eslint@8.10.0: + /eslint-utils/3.0.0_eslint@8.11.0: resolution: {integrity: sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==} engines: {node: ^10.0.0 || ^12.0.0 || >= 14.0.0} peerDependencies: eslint: '>=5' dependencies: - eslint: 8.10.0 + eslint: 8.11.0 eslint-visitor-keys: 2.1.0 dev: true @@ -1788,12 +1850,12 @@ packages: engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dev: true - /eslint/8.10.0: - resolution: {integrity: sha512-tcI1D9lfVec+R4LE1mNDnzoJ/f71Kl/9Cv4nG47jOueCMBrCCKYXr4AUVS7go6mWYGFD4+EoN6+eXSrEbRzXVw==} + /eslint/8.11.0: + resolution: {integrity: sha512-/KRpd9mIRg2raGxHRGwW9ZywYNAClZrHjdueHcrVDuO3a6bj83eoTirCCk0M0yPwOjWYKHwRVRid+xK4F/GHgA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} hasBin: true dependencies: - '@eslint/eslintrc': 1.2.0 + '@eslint/eslintrc': 1.2.1 '@humanwhocodes/config-array': 0.9.2 ajv: 6.12.6 chalk: 4.1.2 @@ -1802,7 +1864,7 @@ packages: doctrine: 3.0.0 escape-string-regexp: 4.0.0 eslint-scope: 7.1.1 - eslint-utils: 3.0.0_eslint@8.10.0 + eslint-utils: 3.0.0_eslint@8.11.0 eslint-visitor-keys: 3.3.0 espree: 9.3.1 esquery: 1.4.0 @@ -1945,6 +2007,22 @@ packages: to-regex-range: 5.0.1 dev: true + /find-up/4.1.0: + resolution: {integrity: sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==} + engines: {node: '>=8'} + dependencies: + locate-path: 5.0.0 + path-exists: 4.0.0 + dev: true + + /find-up/5.0.0: + resolution: {integrity: sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==} + engines: {node: '>=10'} + dependencies: + locate-path: 6.0.0 + path-exists: 4.0.0 + dev: true + /flat-cache/3.0.4: resolution: {integrity: sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==} engines: {node: ^10.12.0 || >=12.0.0} @@ -1967,6 +2045,16 @@ packages: uglify-js: 2.8.29 dev: false + /follow-redirects/1.14.8: + resolution: {integrity: sha512-1x0S9UVJHsQprFcEC/qnNzBLcIxsjAV905f/UkQxbclCsoTWlacCNOpQa/anodLl2uaEKFhfWOvM2Qg77+15zA==} + engines: {node: '>=4.0'} + peerDependencies: + debug: '*' + peerDependenciesMeta: + debug: + optional: true + dev: false + /for-each/0.3.3: resolution: {integrity: sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==} dependencies: @@ -2158,11 +2246,6 @@ packages: engines: {node: '>=10.17.0'} dev: true - /ignore/4.0.6: - resolution: {integrity: sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==} - engines: {node: '>= 4'} - dev: true - /ignore/5.2.0: resolution: {integrity: sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ==} engines: {node: '>= 4'} @@ -2513,6 +2596,20 @@ packages: engines: {node: '>=14'} dev: true + /locate-path/5.0.0: + resolution: {integrity: sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==} + engines: {node: '>=8'} + dependencies: + p-locate: registry.npmmirror.com/p-locate/4.1.0 + dev: true + + /locate-path/6.0.0: + resolution: {integrity: sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==} + engines: {node: '>=10'} + dependencies: + p-locate: 5.0.0 + dev: true + /lodash-es/4.17.21: resolution: {integrity: sha512-mKnC+QJ9pWVzv+C4/U3rRsHapFfHvQFoFB92e52xeyGMcX6/OlIl78je1u8vePzYZSkkogMPJ2yjxxsb89cxyw==} dev: false @@ -2557,6 +2654,13 @@ packages: dependencies: sourcemap-codec: 1.4.8 + /magic-string/0.26.1: + resolution: {integrity: sha512-ndThHmvgtieXe8J/VGPjG+Apu7v7ItcD5mhEIvOscWjPF/ccOiLxHaSuCAS2G+3x4GKsAbT8u7zdyamupui8Tg==} + engines: {node: '>=12'} + dependencies: + sourcemap-codec: 1.4.8 + dev: true + /merge-stream/2.0.0: resolution: {integrity: sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==} dev: true @@ -2589,16 +2693,27 @@ packages: dependencies: brace-expansion: 1.1.11 + /minimatch/5.0.1: + resolution: {integrity: sha512-nLDxIFRyhDblz3qMuq+SoRZED4+miJ/G+tdDrjkkkRnjAsBexeGpgjLEQ0blJy7rHhR2b93rhQY4SvyWu9v03g==} + engines: {node: '>=10'} + dependencies: + brace-expansion: 2.0.1 + dev: true + /minimist/1.2.5: resolution: {integrity: sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==} dev: false + /ms/2.0.0: + resolution: {integrity: sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=} + dev: true + /ms/2.1.2: resolution: {integrity: sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==} dev: true - /naive-ui/2.26.0_vue@3.2.31: - resolution: {integrity: sha512-4+78iqpQs1t8Xlq3Hrk1eSsm17d6ZScMNvnyo+KAiYdAWCfEsIdKb6ulkPGu7T0hpWL5A3TctJ5ioSbNlbN4LA==} + /naive-ui/2.26.4_vue@3.2.31: + resolution: {integrity: sha512-yJQl6y58pxQWKi8YAofiFk0+4WVN+dNYoyKiMfaVdvVQTh9VxjBrcs4z5NUT+d98xUXOtmMzpIlrW/4P1xty+w==} peerDependencies: vue: ^3.0.0 dependencies: @@ -2609,7 +2724,7 @@ packages: async-validator: 4.0.7 css-render: 0.15.8 date-fns: 2.28.0 - date-fns-tz: 1.2.2_date-fns@2.28.0 + date-fns-tz: 1.3.0_date-fns@2.28.0 evtd: 0.2.3 highlight.js: 11.3.1 lodash: 4.17.21 @@ -2739,6 +2854,20 @@ packages: word-wrap: 1.2.3 dev: true + /p-limit/3.1.0: + resolution: {integrity: sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==} + engines: {node: '>=10'} + dependencies: + yocto-queue: 0.1.0 + dev: true + + /p-locate/5.0.0: + resolution: {integrity: sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==} + engines: {node: '>=10'} + dependencies: + p-limit: 3.1.0 + dev: true + /p-map/4.0.0: resolution: {integrity: sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ==} engines: {node: '>=10'} @@ -2767,6 +2896,16 @@ packages: tslib: 2.3.1 dev: true + /path-exists/3.0.0: + resolution: {integrity: sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=} + engines: {node: '>=4'} + dev: true + + /path-exists/4.0.0: + resolution: {integrity: sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==} + engines: {node: '>=8'} + dev: true + /path-is-absolute/1.0.1: resolution: {integrity: sha1-F0uSaHNVNP+8es5r9TpanhtcX18=} engines: {node: '>=0.10.0'} @@ -3434,14 +3573,14 @@ packages: /tslib/2.3.1: resolution: {integrity: sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==} - /tsutils/3.21.0_typescript@4.5.5: + /tsutils/3.21.0_typescript@4.6.2: resolution: {integrity: sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==} engines: {node: '>= 6'} peerDependencies: typescript: '>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta' dependencies: tslib: 1.14.1 - typescript: 4.5.5 + typescript: 4.6.2 dev: true /type-check/0.4.0: @@ -3461,12 +3600,6 @@ packages: engines: {node: '>=10'} dev: true - /typescript/4.5.5: - resolution: {integrity: sha512-TCTIul70LyWe6IJWT8QSYeA54WQe8EjQFU4wY52Fasj5UKx88LNYKCgBEHcOMOrFF1rKGbD8v/xcNWVUq9SymA==} - engines: {node: '>=4.2.0'} - hasBin: true - dev: true - /typescript/4.6.2: resolution: {integrity: sha512-HM/hFigTBHZhLXshn9sN37H085+hQGeJHJ/X7LpBWLID/fbc2acUMfU+lGD98X81sKP+pFa9f0DZmCwB9GnbAg==} engines: {node: '>=4.2.0'} @@ -3504,8 +3637,40 @@ packages: engines: {node: '>= 10.0.0'} dev: true - /unplugin-vue-components/0.17.21_vite@2.8.6+vue@3.2.31: - resolution: {integrity: sha512-jkXksUF6zkNbzHQbw1DdrsQyVoMZGESRZDIGd9x7nUP+65nHdpBCY/JmlxSjKbuTrOwfMsk6FQFa0RpRueOCKg==} + /unplugin-icons/0.13.3_vite@2.8.6: + resolution: {integrity: sha512-HkNCexbEYNkvZkCH+ytUUXgxvLsd/cTCzNQCsBjpJrZ9bhNVxosf9sYGxJdc2BbdEhnaKYNNrwaP11EzmiW6gQ==} + peerDependencies: + '@svgr/core': '>=5.5.0' + '@vue/compiler-sfc': ^3.0.2 + vue-template-compiler: ^2.6.12 + vue-template-es2015-compiler: ^1.9.0 + peerDependenciesMeta: + '@svgr/core': + optional: true + '@vue/compiler-sfc': + optional: true + vue-template-compiler: + optional: true + vue-template-es2015-compiler: + optional: true + dependencies: + '@antfu/install-pkg': 0.1.0 + '@antfu/utils': 0.5.0 + '@iconify/utils': 1.0.23 + debug: 4.3.3 + kolorist: 1.5.1 + local-pkg: 0.4.1 + unplugin: 0.3.3_vite@2.8.6 + transitivePeerDependencies: + - esbuild + - rollup + - supports-color + - vite + - webpack + dev: true + + /unplugin-vue-components/0.18.0_vite@2.8.6+vue@3.2.31: + resolution: {integrity: sha512-qk4AgtsydOw1RoGjVlC9toBnq9U8UD8gORRbZjZoNV14c1n5+ZZXV1Hjf7ne6SCt/SROBxpK6Kh3iqL0d8ijpw==} engines: {node: '>=14'} peerDependencies: '@babel/parser': ^7.15.8 @@ -3517,16 +3682,16 @@ packages: '@babel/traverse': optional: true dependencies: - '@antfu/utils': 0.4.0 - '@rollup/pluginutils': 4.1.2 - chokidar: 3.5.2 + '@antfu/utils': 0.5.0 + '@rollup/pluginutils': 4.2.0 + chokidar: 3.5.3 debug: 4.3.3 fast-glob: 3.2.11 local-pkg: 0.4.1 - magic-string: 0.25.7 - minimatch: 3.0.4 + magic-string: 0.26.1 + minimatch: 5.0.1 resolve: 1.22.0 - unplugin: 0.3.2_vite@2.8.6 + unplugin: 0.4.0_vite@2.8.6 vue: registry.npmmirror.com/vue/3.2.31 transitivePeerDependencies: - esbuild @@ -3536,8 +3701,8 @@ packages: - webpack dev: true - /unplugin/0.3.2_vite@2.8.6: - resolution: {integrity: sha512-5d0DMYNKZU+S9eZUiBfw6Co32eRg8myUgBPoWSqG/wDFCUE/WznfSsJnZWi1P9l69x4uLJqt2qVq1xW/AsXFrw==} + /unplugin/0.3.3_vite@2.8.6: + resolution: {integrity: sha512-WjZWpUqqcYPQ/efR00Zm2m1+J1LitwoZ4uhHV4VdZ+IpW0Nh/qnDYtVf+nLhozXdGxslMPecOshVR7NiWFl4gA==} peerDependencies: esbuild: '>=0.13' rollup: ^2.50.0 @@ -3557,6 +3722,28 @@ packages: webpack-virtual-modules: 0.4.3 dev: true + /unplugin/0.4.0_vite@2.8.6: + resolution: {integrity: sha512-4ScITEmzlz1iZW3tkz+3L1V5k/xMQ6kjgm4lEXKxH0ozd8/OUWfiSA7RMRyrawsvq/t50JIzPpp1UyuSL/AXkA==} + peerDependencies: + esbuild: '>=0.13' + rollup: ^2.50.0 + vite: ^2.3.0 + webpack: 4 || 5 + peerDependenciesMeta: + esbuild: + optional: true + rollup: + optional: true + vite: + optional: true + webpack: + optional: true + dependencies: + chokidar: 3.5.3 + vite: 2.8.6_sass@1.49.9 + webpack-virtual-modules: 0.4.3 + dev: true + /upath/2.0.1: resolution: {integrity: sha512-1uEe95xksV1O0CYKXo8vQvN1JEbtJp7lb7C5U9HMsIp6IVwntkH/oNUzyVNQSd4S1sYk2FpSSW44FqMc8qee5w==} engines: {node: '>=4'} @@ -3789,8 +3976,8 @@ packages: vue: registry.npmmirror.com/vue/3.2.31 dev: false - /vue-router/4.0.13_vue@3.2.31: - resolution: {integrity: sha512-LmXrC+BkDRLak+d5xTMgUYraT3Nj0H/vCbP+7usGvIl9Viqd1UP6AsP0i69pSbn9O0dXK/xCdp4yPw21HqV9Jw==} + /vue-router/4.0.14_vue@3.2.31: + resolution: {integrity: sha512-wAO6zF9zxA3u+7AkMPqw9LjoUCjSxfFvINQj3E/DceTt6uEz1XZLraDhdg2EYmvVwTBSGlLYsUw8bDmx0754Mw==} peerDependencies: vue: ^3.2.0 dependencies: @@ -3798,14 +3985,14 @@ packages: vue: registry.npmmirror.com/vue/3.2.31 dev: false - /vue-tsc/0.32.1_typescript@4.5.5: + /vue-tsc/0.32.1_typescript@4.6.2: resolution: {integrity: sha512-HR34cFr14GDpV9WMX0kMxIAvieg735Q5sQ67MkIBEXtjuR2Yo5y43noiMMjoHZ6YqcjidXlCFbBiJrplLX/W7w==} hasBin: true peerDependencies: typescript: '*' dependencies: '@volar/shared': 0.32.1 - typescript: 4.5.5 + typescript: 4.6.2 vscode-vue-languageservice: 0.32.1 dev: true @@ -3946,6 +4133,11 @@ packages: window-size: 0.1.0 dev: false + /yocto-queue/0.1.0: + resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==} + engines: {node: '>=10'} + dev: true + registry.nlark.com/@better-scroll/core/2.4.2: resolution: {integrity: sha1-5pRwAS15kjoYA0w+STFyD7sG6uU=, registry: http://registry.npm.taobao.org/, tarball: https://registry.nlark.com/@better-scroll/core/download/@better-scroll/core-2.4.2.tgz} name: '@better-scroll/core' @@ -4531,7 +4723,7 @@ packages: version: 1.1.2 engines: {node: '>= 0.4'} dependencies: - call-bind: registry.npmmirror.com/call-bind/1.0.2 + call-bind: 1.0.2 has-tostringtag: registry.npmmirror.com/has-tostringtag/1.0.0 dev: true @@ -4992,29 +5184,6 @@ packages: version: 0.0.8 dev: true - registry.npmmirror.com/@antfu/install-pkg/0.1.0: - resolution: {integrity: sha512-VaIJd3d1o7irZfK1U0nvBsHMyjkuyMP3HKYVV53z8DKyulkHKmjhhtccXO51WSPeeSHIeoJEoNOKavYpS7jkZw==, registry: http://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@antfu/install-pkg/-/install-pkg-0.1.0.tgz} - name: '@antfu/install-pkg' - version: 0.1.0 - dependencies: - execa: registry.npmmirror.com/execa/5.1.1 - find-up: registry.npmmirror.com/find-up/5.0.0 - dev: true - - registry.npmmirror.com/@antfu/utils/0.3.0: - resolution: {integrity: sha512-UU8TLr/EoXdg7OjMp0h9oDoIAVr+Z/oW9cpOxQQyrsz6Qzd2ms/1CdWx8fl2OQdFpxGmq5Vc4TwfLHId6nAZjA==, registry: http://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@antfu/utils/-/utils-0.3.0.tgz} - name: '@antfu/utils' - version: 0.3.0 - dependencies: - '@types/throttle-debounce': registry.npmmirror.com/@types/throttle-debounce/2.1.0 - dev: true - - registry.npmmirror.com/@antfu/utils/0.5.0: - resolution: {integrity: sha512-MrAQ/MrPSxbh1bBrmwJjORfJymw4IqSHFBXqvxaga3ZdDM+/zokYF8DjyJpSjY2QmpmgQrajDUBJOWrYeARfzA==, registry: http://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@antfu/utils/-/utils-0.5.0.tgz} - name: '@antfu/utils' - version: 0.5.0 - dev: true - registry.npmmirror.com/@babel/code-frame/7.16.7: resolution: {integrity: sha512-iAXqUn8IIeBTNd72xsFlgaXHkMBMt6y4HJp1tIaK465CWLT/fG1aqB7ykr95gHHmlBdGbFeWWfyB4NJJ0nmeIg==, registry: http://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@babel/code-frame/-/code-frame-7.16.7.tgz} name: '@babel/code-frame' @@ -5259,27 +5428,6 @@ packages: '@cspotcode/source-map-consumer': registry.npmmirror.com/@cspotcode/source-map-consumer/0.8.0 dev: true - registry.npmmirror.com/@iconify/types/1.0.12: - resolution: {integrity: sha512-6er6wSGF3hgc1JEZqiGpg21CTCjHBYOUwqLmb2Idzkjiw6ogalGP0ZMLVutCzah+0WB4yP+Zd2oVPN8jvJ+Ftg==, registry: http://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@iconify/types/-/types-1.0.12.tgz} - name: '@iconify/types' - version: 1.0.12 - dev: true - - registry.npmmirror.com/@iconify/utils/1.0.23: - resolution: {integrity: sha512-Ktdmpe4mkMXQAnnDUz3s6s5aY/BeVPwHC1d5IhG1bgrWVNWFQNUj8cQPMbHpNCSD9MRC5yGxm9/PGPpOWGJLAg==, registry: http://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@iconify/utils/-/utils-1.0.23.tgz} - name: '@iconify/utils' - version: 1.0.23 - dependencies: - '@antfu/install-pkg': registry.npmmirror.com/@antfu/install-pkg/0.1.0 - '@antfu/utils': registry.npmmirror.com/@antfu/utils/0.3.0 - '@iconify/types': registry.npmmirror.com/@iconify/types/1.0.12 - debug: 4.3.3 - kolorist: 1.5.1 - local-pkg: registry.npmmirror.com/local-pkg/0.4.1 - transitivePeerDependencies: - - supports-color - dev: true - registry.npmmirror.com/@nodelib/fs.stat/2.0.5: resolution: {integrity: sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==, registry: http://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz} name: '@nodelib/fs.stat' @@ -5406,12 +5554,6 @@ packages: '@types/node': 17.0.21 dev: true - registry.npmmirror.com/@types/throttle-debounce/2.1.0: - resolution: {integrity: sha512-5eQEtSCoESnh2FsiLTxE121IiE60hnMqcb435fShf4bpLRjEu1Eoekht23y6zXS9Ts3l+Szu3TARnTsA0GkOkQ==, registry: http://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@types/throttle-debounce/-/throttle-debounce-2.1.0.tgz} - name: '@types/throttle-debounce' - version: 2.1.0 - dev: true - registry.npmmirror.com/@types/ua-parser-js/0.7.36: resolution: {integrity: sha512-N1rW+njavs70y2cApeIw1vLMYXRwfBy+7trgavGuuTfOd7j1Yh7QTRc/yqsPl6ncokt72ZXuxEU0PiCp9bSwNQ==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@types/ua-parser-js/-/ua-parser-js-0.7.36.tgz} name: '@types/ua-parser-js' @@ -5470,7 +5612,7 @@ packages: version: 6.0.0-beta.21.1 dev: false - registry.npmmirror.com/@vue/eslint-config-prettier/7.0.0_eslint@8.10.0+prettier@2.5.1: + registry.npmmirror.com/@vue/eslint-config-prettier/7.0.0_eslint@8.11.0+prettier@2.5.1: resolution: {integrity: sha512-/CTc6ML3Wta1tCe1gUeO0EYnVXfo3nJXsIhZ8WJr3sov+cGASr6yuiibJTL6lmIBm7GobopToOuB3B6AWyV0Iw==, registry: http://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@vue/eslint-config-prettier/download/@vue/eslint-config-prettier-7.0.0.tgz} id: registry.npmmirror.com/@vue/eslint-config-prettier/7.0.0 name: '@vue/eslint-config-prettier' @@ -5479,13 +5621,13 @@ packages: eslint: '>= 7.28.0' prettier: '>= 2.0.0' dependencies: - eslint: 8.10.0 - eslint-config-prettier: 8.5.0_eslint@8.10.0 - eslint-plugin-prettier: registry.npmmirror.com/eslint-plugin-prettier/4.0.0_f3d13a703a9c1079e3d1af6044603beb + eslint: 8.11.0 + eslint-config-prettier: 8.5.0_eslint@8.11.0 + eslint-plugin-prettier: registry.npmmirror.com/eslint-plugin-prettier/4.0.0_c9d5adccfd1d43a8805a302169f6a967 prettier: registry.npmmirror.com/prettier/2.5.1 dev: true - registry.npmmirror.com/@vue/eslint-config-typescript/10.0.0_6bae48b99b40de9ce3e67c9c629a2961: + registry.npmmirror.com/@vue/eslint-config-typescript/10.0.0_5e58415d4c9ab0c3da8935a9b8bb8c26: resolution: {integrity: sha512-F94cL8ug3FaYXlCfU5/wiGjk1qeadmoBpRGAOBq+qre3Smdupa59dd6ZJrsfRODpsMPyTG7330juMDsUvpZ3Rw==, registry: http://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@vue/eslint-config-typescript/download/@vue/eslint-config-typescript-10.0.0.tgz} id: registry.npmmirror.com/@vue/eslint-config-typescript/10.0.0 name: '@vue/eslint-config-typescript' @@ -5495,11 +5637,11 @@ packages: eslint: ^6.2.0 || ^7.0.0 || ^8.0.0 eslint-plugin-vue: ^8.0.1 dependencies: - '@typescript-eslint/eslint-plugin': 5.13.0_1e08a597a4fb107867dcbe827a94038a - '@typescript-eslint/parser': 5.13.0_eslint@8.10.0+typescript@4.5.5 - eslint: 8.10.0 - eslint-plugin-vue: registry.npmmirror.com/eslint-plugin-vue/8.5.0_eslint@8.10.0 - vue-eslint-parser: registry.npmmirror.com/vue-eslint-parser/8.0.1_eslint@8.10.0 + '@typescript-eslint/eslint-plugin': 5.14.0_ace6f9e7722b813e21eaf2dc993bc413 + '@typescript-eslint/parser': 5.14.0_eslint@8.11.0+typescript@4.6.2 + eslint: 8.11.0 + eslint-plugin-vue: registry.npmmirror.com/eslint-plugin-vue/8.5.0_eslint@8.11.0 + vue-eslint-parser: registry.npmmirror.com/vue-eslint-parser/8.0.1_eslint@8.11.0 transitivePeerDependencies: - supports-color - typescript @@ -5686,16 +5828,6 @@ packages: engines: {node: '>=0.10.0'} dev: true - registry.npmmirror.com/axios/0.26.0: - resolution: {integrity: sha512-lKoGLMYtHvFrPVt3r+RBMp9nh34N0M8zEfCWqdWZx6phynIEhQqAdydpyBAAG211zlhX9Rgu08cOamy6XjE5Og==, registry: http://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/axios/-/axios-0.26.0.tgz} - name: axios - version: 0.26.0 - dependencies: - follow-redirects: registry.npmmirror.com/follow-redirects/1.14.8 - transitivePeerDependencies: - - debug - dev: false - registry.npmmirror.com/balanced-match/1.0.2: resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==, registry: http://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/balanced-match/-/balanced-match-1.0.2.tgz} name: balanced-match @@ -6201,7 +6333,7 @@ packages: engines: {node: '>=0.8.0'} dev: true - registry.npmmirror.com/eslint-config-airbnb-base/15.0.0_8b406960a2a06af75ddac353adbd0cfd: + registry.npmmirror.com/eslint-config-airbnb-base/15.0.0_fe22d862ffeecaee86c93a006d59e41e: resolution: {integrity: sha512-xaX3z4ZZIcFLvh2oUNvcX5oEofXda7giYmuplVxoOg5A7EXJMrUyqRgR+mhDhPK8LZ4PttFOBvCYDbX3sUoUig==, registry: http://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/eslint-config-airbnb-base/download/eslint-config-airbnb-base-15.0.0.tgz} id: registry.npmmirror.com/eslint-config-airbnb-base/15.0.0 name: eslint-config-airbnb-base @@ -6212,8 +6344,8 @@ packages: eslint-plugin-import: ^2.25.2 dependencies: confusing-browser-globals: registry.npmmirror.com/confusing-browser-globals/1.0.11 - eslint: 8.10.0 - eslint-plugin-import: registry.npmmirror.com/eslint-plugin-import/2.25.4_eslint@8.10.0 + eslint: 8.11.0 + eslint-plugin-import: registry.npmmirror.com/eslint-plugin-import/2.25.4_eslint@8.11.0 object.assign: registry.nlark.com/object.assign/4.1.2 object.entries: registry.npmmirror.com/object.entries/1.1.5 semver: registry.nlark.com/semver/6.3.0 @@ -6229,7 +6361,7 @@ packages: find-up: registry.npmmirror.com/find-up/2.1.0 dev: true - registry.npmmirror.com/eslint-plugin-import/2.25.4_eslint@8.10.0: + registry.npmmirror.com/eslint-plugin-import/2.25.4_eslint@8.11.0: resolution: {integrity: sha512-/KJBASVFxpu0xg1kIBn9AUa8hQVnszpwgE7Ld0lKAlx7Ie87yzEzCgSkekt+le/YVhiaosO4Y14GDAOc41nfxA==, registry: http://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/eslint-plugin-import/download/eslint-plugin-import-2.25.4.tgz} id: registry.npmmirror.com/eslint-plugin-import/2.25.4 name: eslint-plugin-import @@ -6242,7 +6374,7 @@ packages: array.prototype.flat: registry.npmmirror.com/array.prototype.flat/1.2.5 debug: registry.npmmirror.com/debug/2.6.9 doctrine: registry.nlark.com/doctrine/2.1.0 - eslint: 8.10.0 + eslint: 8.11.0 eslint-import-resolver-node: registry.nlark.com/eslint-import-resolver-node/0.3.6 eslint-module-utils: registry.npmmirror.com/eslint-module-utils/2.7.2 has: registry.nlark.com/has/1.0.3 @@ -6254,7 +6386,7 @@ packages: tsconfig-paths: registry.npmmirror.com/tsconfig-paths/3.12.0 dev: true - registry.npmmirror.com/eslint-plugin-prettier/4.0.0_f3d13a703a9c1079e3d1af6044603beb: + registry.npmmirror.com/eslint-plugin-prettier/4.0.0_c9d5adccfd1d43a8805a302169f6a967: resolution: {integrity: sha1-i5nR5LiySnYkcrRWeZICNhnLmOA=, registry: http://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/eslint-plugin-prettier/download/eslint-plugin-prettier-4.0.0.tgz} id: registry.npmmirror.com/eslint-plugin-prettier/4.0.0 name: eslint-plugin-prettier @@ -6268,13 +6400,13 @@ packages: eslint-config-prettier: optional: true dependencies: - eslint: 8.10.0 - eslint-config-prettier: 8.5.0_eslint@8.10.0 + eslint: 8.11.0 + eslint-config-prettier: 8.5.0_eslint@8.11.0 prettier: registry.npmmirror.com/prettier/2.5.1 prettier-linter-helpers: registry.nlark.com/prettier-linter-helpers/1.0.0 dev: true - registry.npmmirror.com/eslint-plugin-vue/8.5.0_eslint@8.10.0: + registry.npmmirror.com/eslint-plugin-vue/8.5.0_eslint@8.11.0: resolution: {integrity: sha512-i1uHCTAKOoEj12RDvdtONWrGzjFm/djkzqfhmQ0d6M/W8KM81mhswd/z+iTZ0jCpdUedW3YRgcVfQ37/J4zoYQ==, registry: http://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/eslint-plugin-vue/-/eslint-plugin-vue-8.5.0.tgz} id: registry.npmmirror.com/eslint-plugin-vue/8.5.0 name: eslint-plugin-vue @@ -6283,16 +6415,16 @@ packages: peerDependencies: eslint: ^6.2.0 || ^7.0.0 || ^8.0.0 dependencies: - eslint: 8.10.0 - eslint-utils: registry.npmmirror.com/eslint-utils/3.0.0_eslint@8.10.0 + eslint: 8.11.0 + eslint-utils: registry.npmmirror.com/eslint-utils/3.0.0_eslint@8.11.0 natural-compare: registry.npmmirror.com/natural-compare/1.4.0 semver: registry.npmmirror.com/semver/7.3.5 - vue-eslint-parser: registry.npmmirror.com/vue-eslint-parser/8.0.1_eslint@8.10.0 + vue-eslint-parser: registry.npmmirror.com/vue-eslint-parser/8.0.1_eslint@8.11.0 transitivePeerDependencies: - supports-color dev: true - registry.npmmirror.com/eslint-utils/3.0.0_eslint@8.10.0: + registry.npmmirror.com/eslint-utils/3.0.0_eslint@8.11.0: resolution: {integrity: sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/eslint-utils/-/eslint-utils-3.0.0.tgz} id: registry.npmmirror.com/eslint-utils/3.0.0 name: eslint-utils @@ -6301,7 +6433,7 @@ packages: peerDependencies: eslint: '>=5' dependencies: - eslint: 8.10.0 + eslint: 8.11.0 eslint-visitor-keys: registry.npmmirror.com/eslint-visitor-keys/2.1.0 dev: true @@ -6394,24 +6526,14 @@ packages: locate-path: registry.npmmirror.com/locate-path/2.0.0 dev: true - registry.npmmirror.com/find-up/4.1.0: - resolution: {integrity: sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==, registry: http://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/find-up/-/find-up-4.1.0.tgz} - name: find-up - version: 4.1.0 - engines: {node: '>=8'} - dependencies: - locate-path: registry.npmmirror.com/locate-path/5.0.0 - path-exists: registry.npmmirror.com/path-exists/4.0.0 - dev: true - registry.npmmirror.com/find-up/5.0.0: resolution: {integrity: sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==, registry: http://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/find-up/-/find-up-5.0.0.tgz} name: find-up version: 5.0.0 engines: {node: '>=10'} dependencies: - locate-path: registry.npmmirror.com/locate-path/6.0.0 - path-exists: registry.npmmirror.com/path-exists/4.0.0 + locate-path: 6.0.0 + path-exists: 4.0.0 dev: true registry.npmmirror.com/findup-sync/4.0.0: @@ -6426,18 +6548,6 @@ packages: resolve-dir: registry.nlark.com/resolve-dir/1.0.1 dev: true - registry.npmmirror.com/follow-redirects/1.14.8: - resolution: {integrity: sha512-1x0S9UVJHsQprFcEC/qnNzBLcIxsjAV905f/UkQxbclCsoTWlacCNOpQa/anodLl2uaEKFhfWOvM2Qg77+15zA==, registry: http://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/follow-redirects/-/follow-redirects-1.14.8.tgz} - name: follow-redirects - version: 1.14.8 - engines: {node: '>=4.0'} - peerDependencies: - debug: '*' - peerDependenciesMeta: - debug: - optional: true - dev: false - registry.npmmirror.com/fs-extra/10.0.0: resolution: {integrity: sha512-C5owb14u9eJwizKGdchcDUQeFtlSHHthBk8pbX9Vc1PFZrLombudjDnNns88aYslCyF6IY5SUw3Roz6xShcEIQ==, registry: http://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/fs-extra/-/fs-extra-10.0.0.tgz} name: fs-extra @@ -6624,7 +6734,7 @@ packages: version: 4.0.2 engines: {node: '>=10'} dependencies: - lru-cache: registry.npmmirror.com/lru-cache/6.0.0 + lru-cache: 6.0.0 dev: true registry.npmmirror.com/human-signals/2.1.0: @@ -6886,25 +6996,12 @@ packages: engines: {node: '>=0.10.0'} dev: true - registry.npmmirror.com/kolorist/1.5.1: - resolution: {integrity: sha512-lxpCM3HTvquGxKGzHeknB/sUjuVoUElLlfYnXZT73K8geR9jQbroGlSCFBax9/0mpGoD3kzcMLnOlGQPJJNyqQ==, registry: http://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/kolorist/-/kolorist-1.5.1.tgz} - name: kolorist - version: 1.5.1 - dev: true - registry.npmmirror.com/lines-and-columns/1.2.4: resolution: {integrity: sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==, registry: http://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/lines-and-columns/-/lines-and-columns-1.2.4.tgz} name: lines-and-columns version: 1.2.4 dev: true - registry.npmmirror.com/local-pkg/0.4.1: - resolution: {integrity: sha512-lL87ytIGP2FU5PWwNDo0w3WhIo2gopIAxPg9RxDYF7m4rr5ahuZxP22xnJHIvaLTe4Z9P6uKKY2UHiwyB4pcrw==, registry: http://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/local-pkg/-/local-pkg-0.4.1.tgz} - name: local-pkg - version: 0.4.1 - engines: {node: '>=14'} - dev: true - registry.npmmirror.com/locate-path/2.0.0: resolution: {integrity: sha512-NCI2kiDkyR7VeEKm27Kda/iQHyKJe1Bu0FlTbYp3CqJu+9IFe9bLyAjMxf5ZDDbEg+iMPzB5zYyUTSm8wVTKmA==, registry: http://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/locate-path/-/locate-path-2.0.0.tgz} name: locate-path @@ -6912,25 +7009,7 @@ packages: engines: {node: '>=4'} dependencies: p-locate: registry.npmmirror.com/p-locate/2.0.0 - path-exists: registry.npmmirror.com/path-exists/3.0.0 - dev: true - - registry.npmmirror.com/locate-path/5.0.0: - resolution: {integrity: sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==, registry: http://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/locate-path/-/locate-path-5.0.0.tgz} - name: locate-path - version: 5.0.0 - engines: {node: '>=8'} - dependencies: - p-locate: registry.npmmirror.com/p-locate/4.1.0 - dev: true - - registry.npmmirror.com/locate-path/6.0.0: - resolution: {integrity: sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==, registry: http://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/locate-path/-/locate-path-6.0.0.tgz} - name: locate-path - version: 6.0.0 - engines: {node: '>=10'} - dependencies: - p-locate: registry.npmmirror.com/p-locate/5.0.0 + path-exists: 3.0.0 dev: true registry.npmmirror.com/lodash-es/4.17.21: @@ -7108,7 +7187,7 @@ packages: dependencies: hosted-git-info: registry.npmmirror.com/hosted-git-info/4.0.2 is-core-module: 2.8.1 - semver: registry.npmmirror.com/semver/7.3.5 + semver: 7.3.5 validate-npm-package-license: registry.npmmirror.com/validate-npm-package-license/3.0.4 dev: true @@ -7200,15 +7279,6 @@ packages: p-try: registry.npmmirror.com/p-try/2.2.0 dev: true - registry.npmmirror.com/p-limit/3.1.0: - resolution: {integrity: sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==, registry: http://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/p-limit/-/p-limit-3.1.0.tgz} - name: p-limit - version: 3.1.0 - engines: {node: '>=10'} - dependencies: - yocto-queue: registry.npmmirror.com/yocto-queue/0.1.0 - dev: true - registry.npmmirror.com/p-locate/2.0.0: resolution: {integrity: sha512-nQja7m7gSKuewoVRen45CtVfODR3crN3goVQ0DDZ9N3yHxgpkuBhZqsaiotSQRrADUrne346peY7kT3TSACykg==, registry: http://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/p-locate/-/p-locate-2.0.0.tgz} name: p-locate @@ -7227,15 +7297,6 @@ packages: p-limit: registry.npmmirror.com/p-limit/2.3.0 dev: true - registry.npmmirror.com/p-locate/5.0.0: - resolution: {integrity: sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==, registry: http://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/p-locate/-/p-locate-5.0.0.tgz} - name: p-locate - version: 5.0.0 - engines: {node: '>=10'} - dependencies: - p-limit: registry.npmmirror.com/p-limit/3.1.0 - dev: true - registry.npmmirror.com/p-try/1.0.0: resolution: {integrity: sha512-U1etNYuMJoIz3ZXSrrySFjsXQTWOx2/jdi86L+2pRvph/qMKL6sbcCYdH23fqsbm8TH2Gn0OybpT4eSFlCVHww==, registry: http://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/p-try/-/p-try-1.0.0.tgz} name: p-try @@ -7262,20 +7323,6 @@ packages: lines-and-columns: registry.npmmirror.com/lines-and-columns/1.2.4 dev: true - registry.npmmirror.com/path-exists/3.0.0: - resolution: {integrity: sha512-bpC7GYwiDYQ4wYLe+FA8lhRjhQCMcQGuSgGGqDkg/QerRWw9CmGRT0iSOVRSZJ29NMLZgIzqaljJ63oaL4NIJQ==, registry: http://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/path-exists/-/path-exists-3.0.0.tgz} - name: path-exists - version: 3.0.0 - engines: {node: '>=4'} - dev: true - - registry.npmmirror.com/path-exists/4.0.0: - resolution: {integrity: sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==, registry: http://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/path-exists/-/path-exists-4.0.0.tgz} - name: path-exists - version: 4.0.0 - engines: {node: '>=8'} - dev: true - registry.npmmirror.com/path-is-absolute/1.0.1: resolution: {integrity: sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz} name: path-is-absolute @@ -7323,7 +7370,7 @@ packages: engines: {node: '>=8.6'} dev: true - registry.npmmirror.com/pinia/2.0.11_typescript@4.5.5+vue@3.2.31: + registry.npmmirror.com/pinia/2.0.11_typescript@4.6.2+vue@3.2.31: resolution: {integrity: sha512-JzcmnMqu28PNWOjDgEDK6fTrIzX8eQZKPPKvu/fpHdpXARUj1xeVdFi3YFIMOWswqaBd589cpmAMdSSTryI9iw==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/pinia/-/pinia-2.0.11.tgz} id: registry.npmmirror.com/pinia/2.0.11 name: pinia @@ -7339,7 +7386,7 @@ packages: optional: true dependencies: '@vue/devtools-api': registry.npmmirror.com/@vue/devtools-api/6.0.0-beta.21.1 - typescript: 4.5.5 + typescript: 4.6.2 vue: registry.npmmirror.com/vue/3.2.31 vue-demi: registry.npmmirror.com/vue-demi/0.12.1_vue@3.2.31 dev: false @@ -7411,7 +7458,7 @@ packages: version: 7.0.1 engines: {node: '>=8'} dependencies: - find-up: registry.npmmirror.com/find-up/4.1.0 + find-up: 4.1.0 read-pkg: registry.npmmirror.com/read-pkg/5.2.0 type-fest: registry.npmmirror.com/type-fest/0.8.1 dev: true @@ -7550,7 +7597,7 @@ packages: version: 6.6.7 engines: {npm: '>=2.0.0'} dependencies: - tslib: registry.npmmirror.com/tslib/1.14.1 + tslib: 1.14.1 dev: true registry.npmmirror.com/safe-buffer/5.2.1: @@ -7841,12 +7888,6 @@ packages: strip-bom: registry.nlark.com/strip-bom/3.0.0 dev: true - registry.npmmirror.com/tslib/1.14.1: - resolution: {integrity: sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==, registry: http://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/tslib/-/tslib-1.14.1.tgz} - name: tslib - version: 1.14.1 - dev: true - registry.npmmirror.com/type-fest/0.18.1: resolution: {integrity: sha512-OIAYXk8+ISY+qTOwkHtKqzAuxchoMiD9Udx+FSGQDuiRR+PJKJHc2NJAXlbhkGwTt/4/nKZxELY1w3ReWOL8mw==, registry: http://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/type-fest/-/type-fest-0.18.1.tgz} name: type-fest @@ -7909,65 +7950,6 @@ packages: engines: {node: '>= 10.0.0'} dev: true - registry.npmmirror.com/unplugin-icons/0.13.2_vite@2.8.6: - resolution: {integrity: sha512-Dwfn5DkKrp/BpZV0R/2wgU39j+kjkeuIQ54PmJ9LhXNpNAS+Huf6Fl/PUmUrlWOvMAz0uPo3y/5lQKZUBjBkBQ==, registry: http://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/unplugin-icons/-/unplugin-icons-0.13.2.tgz} - id: registry.npmmirror.com/unplugin-icons/0.13.2 - name: unplugin-icons - version: 0.13.2 - peerDependencies: - '@svgr/core': '>=5.5.0' - '@vue/compiler-sfc': ^3.0.2 - vue-template-compiler: ^2.6.12 - vue-template-es2015-compiler: ^1.9.0 - peerDependenciesMeta: - '@svgr/core': - optional: true - '@vue/compiler-sfc': - optional: true - vue-template-compiler: - optional: true - vue-template-es2015-compiler: - optional: true - dependencies: - '@antfu/install-pkg': registry.npmmirror.com/@antfu/install-pkg/0.1.0 - '@antfu/utils': registry.npmmirror.com/@antfu/utils/0.5.0 - '@iconify/utils': registry.npmmirror.com/@iconify/utils/1.0.23 - debug: registry.npmmirror.com/debug/4.3.3 - kolorist: registry.npmmirror.com/kolorist/1.5.1 - local-pkg: registry.npmmirror.com/local-pkg/0.4.1 - unplugin: registry.npmmirror.com/unplugin/0.3.2_vite@2.8.6 - transitivePeerDependencies: - - esbuild - - rollup - - supports-color - - vite - - webpack - dev: true - - registry.npmmirror.com/unplugin/0.3.2_vite@2.8.6: - resolution: {integrity: sha512-5d0DMYNKZU+S9eZUiBfw6Co32eRg8myUgBPoWSqG/wDFCUE/WznfSsJnZWi1P9l69x4uLJqt2qVq1xW/AsXFrw==, registry: http://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/unplugin/-/unplugin-0.3.2.tgz} - id: registry.npmmirror.com/unplugin/0.3.2 - name: unplugin - version: 0.3.2 - peerDependencies: - esbuild: '>=0.13' - rollup: ^2.50.0 - vite: ^2.3.0 - webpack: 4 || 5 - peerDependenciesMeta: - esbuild: - optional: true - rollup: - optional: true - vite: - optional: true - webpack: - optional: true - dependencies: - vite: 2.8.6_sass@1.49.9 - webpack-virtual-modules: registry.npmmirror.com/webpack-virtual-modules/0.4.3 - dev: true - registry.npmmirror.com/user-home/2.0.0: resolution: {integrity: sha1-nHC/2Babwdy/SGBODwS4tJzenp8=, registry: http://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/user-home/download/user-home-2.0.0.tgz} name: user-home @@ -8036,7 +8018,7 @@ packages: vue: registry.npmmirror.com/vue/3.2.31 dev: false - registry.npmmirror.com/vue-eslint-parser/8.0.1_eslint@8.10.0: + registry.npmmirror.com/vue-eslint-parser/8.0.1_eslint@8.11.0: resolution: {integrity: sha512-lhWjDXJhe3UZw2uu3ztX51SJAPGPey1Tff2RK3TyZURwbuI4vximQLzz4nQfCv8CZq4xx7uIiogHMMoSJPr33A==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/vue-eslint-parser/-/vue-eslint-parser-8.0.1.tgz} id: registry.npmmirror.com/vue-eslint-parser/8.0.1 name: vue-eslint-parser @@ -8046,7 +8028,7 @@ packages: eslint: '>=6.0.0' dependencies: debug: 4.3.3 - eslint: 8.10.0 + eslint: 8.11.0 eslint-scope: 6.0.0 eslint-visitor-keys: 3.3.0 espree: 9.3.1 @@ -8069,12 +8051,6 @@ packages: '@vue/shared': registry.npmmirror.com/@vue/shared/3.2.31 dev: false - registry.npmmirror.com/webpack-virtual-modules/0.4.3: - resolution: {integrity: sha512-5NUqC2JquIL2pBAAo/VfBP6KuGkHIZQXW/lNKupLPfhViwh8wNsu0BObtl09yuKZszeEUfbXz8xhrHvSG16Nqw==, registry: http://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/webpack-virtual-modules/-/webpack-virtual-modules-0.4.3.tgz} - name: webpack-virtual-modules - version: 0.4.3 - dev: true - registry.npmmirror.com/which/1.3.1: resolution: {integrity: sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/which/-/which-1.3.1.tgz} name: which @@ -8191,10 +8167,3 @@ packages: y18n: registry.npmmirror.com/y18n/5.0.8 yargs-parser: registry.npmmirror.com/yargs-parser/21.0.0 dev: true - - registry.npmmirror.com/yocto-queue/0.1.0: - resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==, registry: http://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/yocto-queue/-/yocto-queue-0.1.0.tgz} - name: yocto-queue - version: 0.1.0 - engines: {node: '>=10'} - dev: true diff --git a/src/components/business/LoadingEmptyWrapper.vue b/src/components/business/LoadingEmptyWrapper.vue index c08bb8fd..28420efe 100644 --- a/src/components/business/LoadingEmptyWrapper.vue +++ b/src/components/business/LoadingEmptyWrapper.vue @@ -53,7 +53,7 @@ const props = withDefaults(defineProps(), { emptyDesc: '暂无数据', iconClass: 'text-320px text-primary', descClass: 'text-16px text-[#666]', - showNetworkReload: false + showNetworkReload: false, }); // 网络状态 @@ -79,7 +79,7 @@ function handleReload() { const stopHandle = watch( () => props.loading, - newValue => { + (newValue) => { // 结束加载判断一下网络状态 if (!newValue) { setNetwork(window.navigator.onLine); diff --git a/src/components/business/LoginAgreement.vue b/src/components/business/LoginAgreement.vue index 3fc03403..6230852b 100644 --- a/src/components/business/LoginAgreement.vue +++ b/src/components/business/LoginAgreement.vue @@ -23,7 +23,7 @@ interface Emits { } const props = withDefaults(defineProps(), { - value: true + value: true, }); const emit = defineEmits(); @@ -34,7 +34,7 @@ const checked = computed({ }, set(newValue: boolean) { emit('update:value', newValue); - } + }, }); function handleClickProtocol() { diff --git a/src/components/common/DarkModeSwitch.vue b/src/components/common/DarkModeSwitch.vue index ab456eff..86a04889 100644 --- a/src/components/common/DarkModeSwitch.vue +++ b/src/components/common/DarkModeSwitch.vue @@ -18,7 +18,7 @@ interface Emits { } const props = withDefaults(defineProps(), { - dark: false + dark: false, }); const emit = defineEmits(); @@ -29,7 +29,7 @@ const darkMode = computed({ }, set(newValue: boolean) { emit('update:dark', newValue); - } + }, }); function handleSwitch() { diff --git a/src/components/common/HoverContainer.vue b/src/components/common/HoverContainer.vue index 031987c9..83a50109 100644 --- a/src/components/common/HoverContainer.vue +++ b/src/components/common/HoverContainer.vue @@ -29,7 +29,7 @@ interface Props { const props = withDefaults(defineProps(), { tooltipContent: '', placement: 'bottom', - contentClass: '' + contentClass: '', }); const showTooltip = computed(() => Boolean(props.tooltipContent)); diff --git a/src/components/common/NaiveProvider.vue b/src/components/common/NaiveProvider.vue index a9e48a76..78d005d9 100644 --- a/src/components/common/NaiveProvider.vue +++ b/src/components/common/NaiveProvider.vue @@ -29,7 +29,7 @@ const NaiveProviderContent = defineComponent({ }, render() { return h('div'); - } + }, }); diff --git a/src/components/common/SystemLogo.vue b/src/components/common/SystemLogo.vue index 565582f3..5a4d1bfe 100644 --- a/src/components/common/SystemLogo.vue +++ b/src/components/common/SystemLogo.vue @@ -10,7 +10,7 @@ interface Props { } withDefaults(defineProps(), { - fill: false + fill: false, }); diff --git a/src/components/custom/CountTo.vue b/src/components/custom/CountTo.vue index 406473be..b24a8093 100644 --- a/src/components/custom/CountTo.vue +++ b/src/components/custom/CountTo.vue @@ -42,7 +42,7 @@ const props = withDefaults(defineProps(), { separator: ',', decimal: '.', useEasing: true, - transition: 'linear' + transition: 'linear', }); const emit = defineEmits<{ @@ -61,7 +61,7 @@ function run() { duration: props.duration, onStarted: () => emit('on-started'), onFinished: () => emit('on-finished'), - ...(props.useEasing ? { transition: TransitionPresets[props.transition] } : {}) + ...(props.useEasing ? { transition: TransitionPresets[props.transition] } : {}), }); } diff --git a/src/components/custom/IconSelect.vue b/src/components/custom/IconSelect.vue index 4951ffd4..eef3934e 100644 --- a/src/components/custom/IconSelect.vue +++ b/src/components/custom/IconSelect.vue @@ -43,7 +43,7 @@ interface Emits { } const props = withDefaults(defineProps(), { - emptyIcon: 'mdi:apps' + emptyIcon: 'mdi:apps', }); const emit = defineEmits(); @@ -51,7 +51,7 @@ const emit = defineEmits(); const theme = useThemeStore(); const searchValue = ref(''); -const iconsList = computed(() => props.icons.filter(v => v.includes(searchValue.value))); +const iconsList = computed(() => props.icons.filter((v) => v.includes(searchValue.value))); const modelValue = computed({ get() { @@ -59,7 +59,7 @@ const modelValue = computed({ }, set(val: string) { emit('update:value', val); - } + }, }); function handleChange(iconItem: string) { diff --git a/src/components/custom/ImageVerify.vue b/src/components/custom/ImageVerify.vue index 12dfbc49..ff1f9562 100644 --- a/src/components/custom/ImageVerify.vue +++ b/src/components/custom/ImageVerify.vue @@ -17,7 +17,7 @@ interface Emits { } const props = withDefaults(defineProps(), { - code: '' + code: '', }); const emit = defineEmits(); @@ -26,11 +26,11 @@ const { domRef, imgCode, setImgCode, getImgCode } = useImageVerify(); watch( () => props.code, - newValue => { + (newValue) => { setImgCode(newValue); } ); -watch(imgCode, newValue => { +watch(imgCode, (newValue) => { emit('update:code', newValue); }); diff --git a/src/composables/common/layout.ts b/src/composables/common/layout.ts index 2582a1af..7737b5f5 100644 --- a/src/composables/common/layout.ts +++ b/src/composables/common/layout.ts @@ -19,23 +19,23 @@ export function useBasicLayout() { vertical: { showLogo: false, showHeaderMenu: false, - showMenuCollape: true + showMenuCollape: true, }, 'vertical-mix': { showLogo: false, showHeaderMenu: false, - showMenuCollape: false + showMenuCollape: false, }, horizontal: { showLogo: true, showHeaderMenu: true, - showMenuCollape: false + showMenuCollape: false, }, 'horizontal-mix': { showLogo: true, showHeaderMenu: false, - showMenuCollape: true - } + showMenuCollape: true, + }, }; const headerProps = computed(() => layoutHeaderProps[theme.layout.mode]); @@ -65,6 +65,6 @@ export function useBasicLayout() { headerProps, siderVisible, siderWidth, - siderCollapsedWidth + siderCollapsedWidth, }; } diff --git a/src/composables/common/router.ts b/src/composables/common/router.ts index 3d484889..9afa0815 100644 --- a/src/composables/common/router.ts +++ b/src/composables/common/router.ts @@ -7,7 +7,7 @@ import type { LoginModuleKey } from '@/interface'; * 路由跳转 * @param inSetup - 是否在vue页面/组件的setup里面调用,在axios里面无法使用useRouter和useRoute */ -export function useRouterPush(inSetup: boolean = true) { +export function useRouterPush(inSetup = true) { const router = inSetup ? useRouter() : globalRouter; const route = globalRouter.currentRoute; @@ -47,7 +47,7 @@ export function useRouterPush(inSetup: boolean = true) { const module: LoginModuleKey = loginModule || 'pwd-login'; const routeLocation: RouteLocationRaw = { name: routeName('login'), - params: { module } + params: { module }, }; const redirect = redirectUrl || route.value.fullPath; Object.assign(routeLocation, { query: { redirect } }); @@ -81,6 +81,6 @@ export function useRouterPush(inSetup: boolean = true) { toHome, toLogin, toLoginModule, - toLoginRedirect + toLoginRedirect, }; } diff --git a/src/composables/common/system.ts b/src/composables/common/system.ts index 8c8a764c..5f4d8156 100644 --- a/src/composables/common/system.ts +++ b/src/composables/common/system.ts @@ -16,7 +16,7 @@ export function useAppInfo(): AppInfo { return { name, title, - desc + desc, }; } diff --git a/src/config/common/service.ts b/src/config/common/service.ts index 07f0d926..2ca01626 100644 --- a/src/config/common/service.ts +++ b/src/config/common/service.ts @@ -36,7 +36,7 @@ export const ERROR_STATUS = { 503: '503: 服务不可用~', 504: '504: 网关超时~', 505: '505: http版本不支持该请求~', - [DEFAULT_REQUEST_ERROR_CODE]: DEFAULT_REQUEST_ERROR_MSG + [DEFAULT_REQUEST_ERROR_CODE]: DEFAULT_REQUEST_ERROR_MSG, }; /** 不弹出错误信息的code */ diff --git a/src/directives/login.ts b/src/directives/login.ts index 450d78f9..ae398bbe 100644 --- a/src/directives/login.ts +++ b/src/directives/login.ts @@ -20,7 +20,7 @@ export default function setupLoginDirective(app: App) { unmounted(el: HTMLElement, binding) { if (binding.value === false) return; el.removeEventListener('click', listenerHandler); - } + }, }; app.directive('login', loginDirective); diff --git a/src/directives/network.ts b/src/directives/network.ts index 229b092f..7651ea91 100644 --- a/src/directives/network.ts +++ b/src/directives/network.ts @@ -18,7 +18,7 @@ export default function setupNetworkDirective(app: App) { unmounted(el: HTMLElement, binding) { if (binding.value === false) return; el.removeEventListener('click', listenerHandler); - } + }, }; app.directive('network', networkDirective); diff --git a/src/enum/common/service.ts b/src/enum/common/service.ts index f4d81362..7edfa971 100644 --- a/src/enum/common/service.ts +++ b/src/enum/common/service.ts @@ -2,5 +2,5 @@ export enum ContentType { json = 'application/json', formUrlencoded = 'application/x-www-form-urlencoded', - formData = 'multipart/form-data' + formData = 'multipart/form-data', } diff --git a/src/enum/common/storage.ts b/src/enum/common/storage.ts index 319b49d3..43d02538 100644 --- a/src/enum/common/storage.ts +++ b/src/enum/common/storage.ts @@ -8,5 +8,5 @@ export enum EnumStorageKey { /** 用户信息 */ 'user-info' = '__USER_INFO__', /** 多页签路由信息 */ - 'tab-routes' = '__TAB_ROUTES__' + 'tab-routes' = '__TAB_ROUTES__', } diff --git a/src/enum/common/system.ts b/src/enum/common/system.ts index a5425b7f..475a546c 100644 --- a/src/enum/common/system.ts +++ b/src/enum/common/system.ts @@ -1,7 +1,7 @@ /** 布局组件的名称 */ export enum EnumLayoutComponentName { basic = 'basic-layout', - blank = 'blank-layout' + blank = 'blank-layout', } /** 登录模块 */ @@ -10,5 +10,5 @@ export enum EnumLoginModule { 'code-login' = '手机验证码登录', 'register' = '注册', 'reset-pwd' = '重置密码', - 'bind-wechat' = '微信绑定' + 'bind-wechat' = '微信绑定', } diff --git a/src/enum/common/theme.ts b/src/enum/common/theme.ts index 53ae9ca7..7e884013 100644 --- a/src/enum/common/theme.ts +++ b/src/enum/common/theme.ts @@ -3,20 +3,20 @@ export enum EnumThemeLayoutMode { 'vertical' = '左侧菜单模式', 'horizontal' = '顶部菜单模式', 'vertical-mix' = '左侧菜单混合模式', - 'horizontal-mix' = '顶部菜单混合模式' + 'horizontal-mix' = '顶部菜单混合模式', } /** 多页签风格 */ export enum EnumThemeTabMode { 'chrome' = '谷歌风格', - 'button' = '按钮风格' + 'button' = '按钮风格', } /** 水平模式的菜单位置 */ export enum EnumThemeHorizontalMenuPosition { 'flex-start' = '居左', 'center' = '居中', - 'flex-end' = '居右' + 'flex-end' = '居右', } /** 过渡动画类型 */ @@ -26,5 +26,5 @@ export enum EnumThemeAnimateMode { 'fade-slide' = '滑动', 'fade' = '消退', 'fade-bottom' = '底部消退', - 'fade-scale' = '缩放消退' + 'fade-scale' = '缩放消退', } diff --git a/src/enum/common/typeof.ts b/src/enum/common/typeof.ts index 76a72de7..320c2cb8 100644 --- a/src/enum/common/typeof.ts +++ b/src/enum/common/typeof.ts @@ -10,5 +10,5 @@ export enum EnumDataType { date = '[object Date]', regexp = '[object RegExp]', set = '[object Set]', - map = '[object Map]' + map = '[object Map]', } diff --git a/src/hooks/business/useCountDown.ts b/src/hooks/business/useCountDown.ts index d3951ba8..230e2787 100644 --- a/src/hooks/business/useCountDown.ts +++ b/src/hooks/business/useCountDown.ts @@ -47,6 +47,6 @@ export default function useCountDown(second: number) { isCounting, start, stop, - isComplete + isComplete, }; } diff --git a/src/hooks/business/useImageVerify.ts b/src/hooks/business/useImageVerify.ts index 3978ead5..20314be7 100644 --- a/src/hooks/business/useImageVerify.ts +++ b/src/hooks/business/useImageVerify.ts @@ -26,7 +26,7 @@ export default function useImageVerify(width = 152, height = 40) { domRef, imgCode, setImgCode, - getImgCode + getImgCode, }; } diff --git a/src/hooks/business/useSmsCode.ts b/src/hooks/business/useSmsCode.ts index f1478589..e96f4c07 100644 --- a/src/hooks/business/useSmsCode.ts +++ b/src/hooks/business/useSmsCode.ts @@ -54,6 +54,6 @@ export default function useSmsCode() { start, isCounting, getSmsCode, - loading + loading, }; } diff --git a/src/hooks/common/useBodyScroll.ts b/src/hooks/common/useBodyScroll.ts index 64a0adbf..be8fc3a0 100644 --- a/src/hooks/common/useBodyScroll.ts +++ b/src/hooks/common/useBodyScroll.ts @@ -10,7 +10,7 @@ interface ScrollBodyStyle { export default function useBodyScroll(duration = 300) { const defaultStyle: ScrollBodyStyle = { overflow: '', - paddingRight: '' + paddingRight: '', }; function getInitBodyStyle() { const { overflow, paddingRight } = document.body.style; @@ -42,6 +42,6 @@ export default function useBodyScroll(duration = 300) { getInitBodyStyle(); return { - scrollBodyHandler + scrollBodyHandler, }; } diff --git a/src/hooks/common/useBoolean.ts b/src/hooks/common/useBoolean.ts index 54af6770..645d4713 100644 --- a/src/hooks/common/useBoolean.ts +++ b/src/hooks/common/useBoolean.ts @@ -1,6 +1,6 @@ import { ref } from 'vue'; -export default function useBoolean(initValue: boolean = false) { +export default function useBoolean(initValue = false) { const bool = ref(initValue); function setBool(value: boolean) { @@ -21,6 +21,6 @@ export default function useBoolean(initValue: boolean = false) { setBool, setTrue, setFalse, - toggle + toggle, }; } diff --git a/src/hooks/common/useContext.ts b/src/hooks/common/useContext.ts index 5d650248..74afb2b8 100644 --- a/src/hooks/common/useContext.ts +++ b/src/hooks/common/useContext.ts @@ -2,7 +2,7 @@ import { provide, inject } from 'vue'; import type { InjectionKey } from 'vue'; /** 创建共享上下文状态 */ -export default function useContext(contextName: string = 'context') { +export default function useContext(contextName = 'context') { const injectKey: InjectionKey = Symbol(contextName); function useProvide(context: T) { @@ -10,11 +10,11 @@ export default function useContext(contextName: string = 'context') { } function useInject() { - return inject(injectKey)!; + return inject(injectKey) as T; } return { useProvide, - useInject + useInject, }; } diff --git a/src/hooks/common/useLoading.ts b/src/hooks/common/useLoading.ts index f6cabb88..86c22420 100644 --- a/src/hooks/common/useLoading.ts +++ b/src/hooks/common/useLoading.ts @@ -1,11 +1,11 @@ import useBoolean from './useBoolean'; -export default function useLoading(initValue: boolean = false) { +export default function useLoading(initValue = false) { const { bool: loading, setTrue: startLoading, setFalse: endLoading } = useBoolean(initValue); return { loading, startLoading, - endLoading + endLoading, }; } diff --git a/src/hooks/common/useLoadingEmpty.ts b/src/hooks/common/useLoadingEmpty.ts index a4ccfcb9..1397fadd 100644 --- a/src/hooks/common/useLoadingEmpty.ts +++ b/src/hooks/common/useLoadingEmpty.ts @@ -9,6 +9,6 @@ export default function useLoadingEmpty(initLoading = false, initEmpty = false) startLoading, endLoading, empty, - setEmpty + setEmpty, }; } diff --git a/src/hooks/common/useModalVisible.ts b/src/hooks/common/useModalVisible.ts index 66b76e88..61143c51 100644 --- a/src/hooks/common/useModalVisible.ts +++ b/src/hooks/common/useModalVisible.ts @@ -11,7 +11,7 @@ export default function useModalVisible(hideScroll = true) { const { scrollBodyHandler } = useBodyScroll(); function modalVisibleWatcher() { - const stopHandle = watch(visible, async newValue => { + const stopHandle = watch(visible, async (newValue) => { scrollBodyHandler(newValue); }); @@ -28,6 +28,6 @@ export default function useModalVisible(hideScroll = true) { visible, openModal, closeModal, - toggleModal + toggleModal, }; } diff --git a/src/hooks/common/useReload.ts b/src/hooks/common/useReload.ts index ffa64c0a..b6e48029 100644 --- a/src/hooks/common/useReload.ts +++ b/src/hooks/common/useReload.ts @@ -24,6 +24,6 @@ export default function useReload() { return { reloadFlag, - handleReload + handleReload, }; } diff --git a/src/interface/enum.ts b/src/interface/enum.ts index 0baddc41..8739fc0c 100644 --- a/src/interface/enum.ts +++ b/src/interface/enum.ts @@ -4,7 +4,7 @@ import type { EnumThemeTabMode, EnumThemeHorizontalMenuPosition, EnumThemeAnimateMode, - EnumLoginModule + EnumLoginModule, } from '@/enum'; /** 布局组件名称 */ diff --git a/src/interface/theme.ts b/src/interface/theme.ts index f1e5821e..bc2bfb20 100644 --- a/src/interface/theme.ts +++ b/src/interface/theme.ts @@ -2,7 +2,7 @@ import type { EnumThemeLayoutMode, EnumThemeTabMode, EnumThemeHorizontalMenuPosition, - EnumThemeAnimateMode + EnumThemeAnimateMode, } from '@/enum'; import type { ThemeLayoutMode, ThemeTabMode, ThemeHorizontalMenuPosition, ThemeAnimateMode } from './enum'; diff --git a/src/layouts/common/GlobalContent/index.vue b/src/layouts/common/GlobalContent/index.vue index beb8f9be..47659068 100644 --- a/src/layouts/common/GlobalContent/index.vue +++ b/src/layouts/common/GlobalContent/index.vue @@ -22,7 +22,7 @@ interface Props { } withDefaults(defineProps(), { - showPadding: true + showPadding: true, }); const app = useAppStore(); diff --git a/src/layouts/common/GlobalHeader/components/UserAvatar.vue b/src/layouts/common/GlobalHeader/components/UserAvatar.vue index 25be41bf..d293f629 100644 --- a/src/layouts/common/GlobalHeader/components/UserAvatar.vue +++ b/src/layouts/common/GlobalHeader/components/UserAvatar.vue @@ -20,17 +20,17 @@ const options = [ { label: '用户中心', key: 'user-center', - icon: iconifyRender('carbon:user-avatar') + icon: iconifyRender('carbon:user-avatar'), }, { type: 'divider', - key: 'divider' + key: 'divider', }, { label: '退出登录', key: 'logout', - icon: iconifyRender('carbon:logout') - } + icon: iconifyRender('carbon:logout'), + }, ]; function handleDropdown(optionKey: string) { @@ -43,7 +43,7 @@ function handleDropdown(optionKey: string) { negativeText: '取消', onPositiveClick: () => { auth.resetAuthStore(); - } + }, }); } } diff --git a/src/layouts/common/GlobalHeader/index.vue b/src/layouts/common/GlobalHeader/index.vue index d31ddee2..059bca84 100644 --- a/src/layouts/common/GlobalHeader/index.vue +++ b/src/layouts/common/GlobalHeader/index.vue @@ -31,7 +31,7 @@ import { GithubSite, FullScreen, ThemeMode, - UserAvatar + UserAvatar, } from './components'; interface Props { diff --git a/src/layouts/common/GlobalSearch/components/SearchModal.vue b/src/layouts/common/GlobalSearch/components/SearchModal.vue index 7a013bf0..24009b30 100644 --- a/src/layouts/common/GlobalSearch/components/SearchModal.vue +++ b/src/layouts/common/GlobalSearch/components/SearchModal.vue @@ -61,10 +61,10 @@ const show = computed({ }, set(val: boolean) { emit('update:value', val); - } + }, }); -watch(show, async val => { +watch(show, async (val) => { if (val) { /** 自动聚焦 */ await nextTick(); @@ -75,7 +75,7 @@ watch(show, async val => { /** 查询 */ function search() { resultOptions.value = routeStore.searchMenus.filter( - menu => keyword.value && menu.meta?.title.toLocaleLowerCase().includes(keyword.value.toLocaleLowerCase().trim()) + (menu) => keyword.value && menu.meta?.title.toLocaleLowerCase().includes(keyword.value.toLocaleLowerCase().trim()) ); if (resultOptions.value?.length > 0) { activePath.value = resultOptions.value[0].path; @@ -97,7 +97,7 @@ function handleClose() { function handleUp() { const { length } = resultOptions.value; if (length === 0) return; - const index = resultOptions.value.findIndex(item => item.path === activePath.value); + const index = resultOptions.value.findIndex((item) => item.path === activePath.value); if (index === 0) { activePath.value = resultOptions.value[length - 1].path; } else { @@ -109,7 +109,7 @@ function handleUp() { function handleDown() { const { length } = resultOptions.value; if (length === 0) return; - const index = resultOptions.value.findIndex(item => item.path === activePath.value); + const index = resultOptions.value.findIndex((item) => item.path === activePath.value); if (index + 1 === length) { activePath.value = resultOptions.value[0].path; } else { @@ -121,8 +121,8 @@ function handleDown() { function handleEnter() { const { length } = resultOptions.value; if (length === 0 || activePath.value === '') return; - const item = resultOptions.value.find(item => item.path === activePath.value); - if (item?.meta?.href) { + const routeItem = resultOptions.value.find((item) => item.path === activePath.value); + if (routeItem?.meta?.href) { window.open(activePath.value, '__blank'); } else { router.push(activePath.value); diff --git a/src/layouts/common/GlobalSearch/components/SearchResult.vue b/src/layouts/common/GlobalSearch/components/SearchResult.vue index f50134e4..0fbbe37d 100644 --- a/src/layouts/common/GlobalSearch/components/SearchResult.vue +++ b/src/layouts/common/GlobalSearch/components/SearchResult.vue @@ -6,7 +6,7 @@ class="bg-[#e5e7eb] dark:bg-dark h-56px mt-8px px-14px rounded-4px cursor-pointer flex-y-center justify-between" :style="{ background: item.path === active ? theme.themeColor : '', - color: item.path === active ? '#fff' : '' + color: item.path === active ? '#fff' : '', }" @click="handleTo" @mouseenter="handleMouse(item)" @@ -48,7 +48,7 @@ const active = computed({ }, set(val: string) { emit('update:value', val); - } + }, }); /** 鼠标移入 */ diff --git a/src/layouts/common/GlobalSider/components/VerticalMixSider/components/MixMenuDetail.vue b/src/layouts/common/GlobalSider/components/VerticalMixSider/components/MixMenuDetail.vue index 6283de35..925c8692 100644 --- a/src/layouts/common/GlobalSider/components/VerticalMixSider/components/MixMenuDetail.vue +++ b/src/layouts/common/GlobalSider/components/VerticalMixSider/components/MixMenuDetail.vue @@ -35,7 +35,7 @@ interface Props { const props = withDefaults(defineProps(), { icon: undefined, - isMini: false + isMini: false, }); const { bool: isHover, setTrue, setFalse } = useBoolean(); diff --git a/src/layouts/common/GlobalSider/components/VerticalMixSider/index.vue b/src/layouts/common/GlobalSider/components/VerticalMixSider/index.vue index f8ed998f..5cb38fcc 100644 --- a/src/layouts/common/GlobalSider/components/VerticalMixSider/index.vue +++ b/src/layouts/common/GlobalSider/components/VerticalMixSider/index.vue @@ -44,7 +44,7 @@ function setActiveParentRouteName(routeName: string) { } const firstDegreeMenus = computed(() => - routeStore.menus.map(item => { + routeStore.menus.map((item) => { const { routeName, label } = item; const icon = item?.icon; const hasChildren = Boolean(item.children && item.children.length); @@ -53,13 +53,13 @@ const firstDegreeMenus = computed(() => routeName, label, icon, - hasChildren + hasChildren, }; }) ); function getActiveParentRouteName() { - firstDegreeMenus.value.some(item => { + firstDegreeMenus.value.some((item) => { const routeName = route.name as string; const flag = routeName?.includes(item.routeName); if (flag) { @@ -85,10 +85,10 @@ function resetFirstDegreeMenus() { const activeChildMenus = computed(() => { const menus: GlobalMenuOption[] = []; - routeStore.menus.some(item => { + routeStore.menus.some((item) => { const flag = item.routeName === activeParentRouteName.value && Boolean(item.children?.length); if (flag) { - menus.push(...item.children!); + menus.push(...(item.children || [])); } return flag; }); diff --git a/src/layouts/common/GlobalTab/components/TabDetail/components/ContextMenu.vue b/src/layouts/common/GlobalTab/components/TabDetail/components/ContextMenu.vue index c0fde1ee..8a0105e7 100644 --- a/src/layouts/common/GlobalTab/components/TabDetail/components/ContextMenu.vue +++ b/src/layouts/common/GlobalTab/components/TabDetail/components/ContextMenu.vue @@ -38,7 +38,7 @@ type Option = DropdownOption & { const props = withDefaults(defineProps(), { visible: false, - currentPath: '' + currentPath: '', }); const emit = defineEmits(); @@ -52,7 +52,7 @@ const dropdownVisible = computed({ }, set(visible: boolean) { emit('update:visible', visible); - } + }, }); function hide() { @@ -64,29 +64,29 @@ const options = computed(() => [ label: '重新加载', key: 'reload-current', disabled: props.currentPath !== tab.activeTab, - icon: iconifyRender('ant-design:reload-outlined') + icon: iconifyRender('ant-design:reload-outlined'), }, { label: '关闭', key: 'close-current', disabled: props.currentPath === tab.homeTab.path, - icon: iconifyRender('ant-design:close-outlined') + icon: iconifyRender('ant-design:close-outlined'), }, { label: '关闭其他', key: 'close-other', - icon: iconifyRender('ant-design:column-width-outlined') + icon: iconifyRender('ant-design:column-width-outlined'), }, { label: '关闭左侧', key: 'close-left', - icon: iconifyRender('mdi:format-horizontal-align-left') + icon: iconifyRender('mdi:format-horizontal-align-left'), }, { label: '关闭右侧', key: 'close-right', - icon: iconifyRender('mdi:format-horizontal-align-right') - } + icon: iconifyRender('mdi:format-horizontal-align-right'), + }, ]); const actionMap = new Map void>([ @@ -94,32 +94,32 @@ const actionMap = new Map void>([ 'reload-current', () => { app.reloadPage(); - } + }, ], [ 'close-current', () => { tab.removeTab(props.currentPath); - } + }, ], [ 'close-other', () => { tab.clearTab([props.currentPath]); - } + }, ], [ 'close-left', () => { tab.clearLeftTab(props.currentPath); - } + }, ], [ 'close-right', () => { tab.clearRightTab(props.currentPath); - } - ] + }, + ], ]); function handleDropdown(optionKey: string) { diff --git a/src/layouts/common/GlobalTab/components/TabDetail/index.vue b/src/layouts/common/GlobalTab/components/TabDetail/index.vue index 99ae562e..9615d48c 100644 --- a/src/layouts/common/GlobalTab/components/TabDetail/index.vue +++ b/src/layouts/common/GlobalTab/components/TabDetail/index.vue @@ -64,7 +64,7 @@ const dropdown = reactive({ visible: false, x: 0, y: 0, - currentPath: '' + currentPath: '', }); function showDropdown() { dropdown.visible = true; @@ -92,7 +92,7 @@ watch( getActiveTabClientX(); }, { - immediate: true + immediate: true, } ); diff --git a/src/layouts/common/SettingDrawer/components/LayoutMode/components/LayoutCheckbox.vue b/src/layouts/common/SettingDrawer/components/LayoutMode/components/LayoutCheckbox.vue index 29007a12..3ab7a0d1 100644 --- a/src/layouts/common/SettingDrawer/components/LayoutMode/components/LayoutCheckbox.vue +++ b/src/layouts/common/SettingDrawer/components/LayoutMode/components/LayoutCheckbox.vue @@ -45,23 +45,23 @@ const layoutConfig: LayoutConfig = { vertical: { placement: 'bottom-start', menuClass: 'w-1/3 h-full', - mainClass: 'w-2/3 h-3/4' + mainClass: 'w-2/3 h-3/4', }, 'vertical-mix': { placement: 'bottom', menuClass: 'w-1/4 h-full', - mainClass: 'w-2/3 h-3/4' + mainClass: 'w-2/3 h-3/4', }, horizontal: { placement: 'bottom', menuClass: 'w-full h-1/4', - mainClass: 'w-full h-3/4' + mainClass: 'w-full h-3/4', }, 'horizontal-mix': { placement: 'bottom-end', menuClass: 'w-full h-1/4', - mainClass: 'w-2/3 h-3/4' - } + mainClass: 'w-2/3 h-3/4', + }, }; const activeConfig = computed(() => layoutConfig[props.mode]); diff --git a/src/layouts/common/SettingDrawer/components/ThemeColorSelect/components/ColorCheckbox.vue b/src/layouts/common/SettingDrawer/components/ThemeColorSelect/components/ColorCheckbox.vue index fe66731f..6ee2b089 100644 --- a/src/layouts/common/SettingDrawer/components/ThemeColorSelect/components/ColorCheckbox.vue +++ b/src/layouts/common/SettingDrawer/components/ThemeColorSelect/components/ColorCheckbox.vue @@ -17,7 +17,7 @@ interface Props { } const props = withDefaults(defineProps(), { - iconClass: 'text-14px' + iconClass: 'text-14px', }); const whiteColors = ['#ffffff', '#fff', 'rgb(255,255,255)']; diff --git a/src/layouts/common/SettingDrawer/components/ThemeConfig/index.vue b/src/layouts/common/SettingDrawer/components/ThemeConfig/index.vue index a7fd6c62..76a5aae9 100644 --- a/src/layouts/common/SettingDrawer/components/ThemeConfig/index.vue +++ b/src/layouts/common/SettingDrawer/components/ThemeConfig/index.vue @@ -30,12 +30,13 @@ function handleResetConfig() { } function clipboardEventListener() { - const copy = new Clipboard(copyRef.value!); + if (!copyRef.value) return; + const copy = new Clipboard(copyRef.value); copy.on('success', () => { window.$dialog?.success({ title: '操作成功', content: '复制成功,请替换 src/settings/theme.json的内容!', - positiveText: '确定' + positiveText: '确定', }); }); } diff --git a/src/plugins/assets.ts b/src/plugins/assets.ts index a2c2eef5..83aeb886 100644 --- a/src/plugins/assets.ts +++ b/src/plugins/assets.ts @@ -5,4 +5,6 @@ import 'swiper/css/pagination'; import '../styles/css/global.css'; /** 引入静态资源(全局引入css、字体等) */ -export default function setupAssets() {} +export default function setupAssets() { + // +} diff --git a/src/plugins/naive.ts b/src/plugins/naive.ts index cb839959..10138af4 100644 --- a/src/plugins/naive.ts +++ b/src/plugins/naive.ts @@ -45,7 +45,7 @@ import { NThing, NTimeline, NTimelineItem, - NTooltip + NTooltip, } from 'naive-ui'; /** 按需引入naiveUI */ @@ -96,8 +96,8 @@ export default function setupNaiveUI(app: App) { NThing, NTimeline, NTimelineItem, - NTooltip - ] + NTooltip, + ], }); app.use(naive); } diff --git a/src/router/guard/index.ts b/src/router/guard/index.ts index 174227b6..9e4a91b5 100644 --- a/src/router/guard/index.ts +++ b/src/router/guard/index.ts @@ -13,7 +13,7 @@ export function createRouterGuard(router: Router) { // 页面跳转权限处理 await createPermissionGuard(to, from, next, router); }); - router.afterEach(to => { + router.afterEach((to) => { // 设置document title useTitle(to.meta.title); // 结束 loadingBar diff --git a/src/router/guard/permission.ts b/src/router/guard/permission.ts index 8105c1ee..bffc86e3 100644 --- a/src/router/guard/permission.ts +++ b/src/router/guard/permission.ts @@ -34,14 +34,14 @@ export async function createPermissionGuard( isLogin && to.name === routeName('login'), () => { next({ name: routeName('root') }); - } + }, ], // 不需要登录权限的页面直接通行 [ !needLogin, () => { next(); - } + }, ], // 未登录状态进入需要登录权限的页面 [ @@ -49,22 +49,22 @@ export async function createPermissionGuard( () => { const redirect = to.fullPath; next({ name: routeName('login'), query: { redirect } }); - } + }, ], // 登录状态进入需要登录权限的页面,有权限直接通行 [ isLogin && needLogin && hasPermission, () => { next(); - } + }, ], [ // 登录状态进入需要登录权限的页面,无权限,重定向到无权限页面 isLogin && needLogin && !hasPermission, () => { next({ name: routeName('no-permission') }); - } - ] + }, + ], ]; exeStrategyActions(actions); diff --git a/src/router/helpers/scroll.ts b/src/router/helpers/scroll.ts index 1cf759c2..8115bf78 100644 --- a/src/router/helpers/scroll.ts +++ b/src/router/helpers/scroll.ts @@ -2,20 +2,20 @@ import type { RouterScrollBehavior } from 'vue-router'; import { useTabStore } from '@/store'; export const scrollBehavior: RouterScrollBehavior = (to, from) => { - return new Promise(resolve => { + return new Promise((resolve) => { const tab = useTabStore(); if (to.hash) { resolve({ el: to.hash, - behavior: 'smooth' + behavior: 'smooth', }); } const { left, top } = tab.getTabScrollPosition(to.path); const scrollPosition = { left, - top + top, }; const { scrollLeft, scrollTop } = document.documentElement; diff --git a/src/router/index.ts b/src/router/index.ts index f1540c31..8976f188 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -11,7 +11,7 @@ const history = VITE_HASH_ROUTE === 'true' ? createWebHashHistory(VITE_BASE_URL) export const router = createRouter({ history, routes: transformAuthRoutesToVueRoutes(constantRoutes), - scrollBehavior + scrollBehavior, }); export async function setupRouter(app: App) { diff --git a/src/router/routes/index.ts b/src/router/routes/index.ts index c4d8b7d0..80ecf337 100644 --- a/src/router/routes/index.ts +++ b/src/router/routes/index.ts @@ -8,24 +8,24 @@ export const constantRoutes: AuthRoute.Route[] = [ path: '/', redirect: '/dashboard/analysis', meta: { - title: 'Root' - } + title: 'Root', + }, }, { name: 'login', path: '/login', component: 'self', - props: route => { + props: (route) => { const moduleType = (route.params.module as LoginModuleKey) || 'pwd-login'; return { - module: moduleType + module: moduleType, }; }, meta: { title: '登录', dynamicPath: `/login/:module(${getLoginModuleRegExp()})?`, - singleLayout: 'blank' - } + singleLayout: 'blank', + }, }, { name: 'no-permission', @@ -33,8 +33,8 @@ export const constantRoutes: AuthRoute.Route[] = [ component: 'self', meta: { title: '无权限', - singleLayout: 'blank' - } + singleLayout: 'blank', + }, }, { name: 'not-found', @@ -42,8 +42,8 @@ export const constantRoutes: AuthRoute.Route[] = [ component: 'self', meta: { title: '未找到', - singleLayout: 'blank' - } + singleLayout: 'blank', + }, }, { name: 'service-error', @@ -51,8 +51,8 @@ export const constantRoutes: AuthRoute.Route[] = [ component: 'self', meta: { title: '服务器错误', - singleLayout: 'blank' - } + singleLayout: 'blank', + }, }, // 匹配无效路径的路由 { @@ -61,9 +61,9 @@ export const constantRoutes: AuthRoute.Route[] = [ component: 'blank', meta: { title: '未找到', - singleLayout: 'blank' - } - } + singleLayout: 'blank', + }, + }, ]; /** 路由名称 */ diff --git a/src/service/request/helpers.ts b/src/service/request/helpers.ts index 2f3a3200..f6499b65 100644 --- a/src/service/request/helpers.ts +++ b/src/service/request/helpers.ts @@ -9,8 +9,8 @@ import { fetchUpdateToken } from '../api'; */ export async function refreshToken(axiosConfig: AxiosRequestConfig) { const { resetAuthStore } = useAuthStore(); - const refreshToken = getRefreshToken(); - const { data } = await fetchUpdateToken(refreshToken); + const rToken = getRefreshToken(); + const { data } = await fetchUpdateToken(rToken); if (data) { setToken(data.token); setRefreshToken(data.refreshToken); diff --git a/src/service/request/instance.ts b/src/service/request/instance.ts index d9146fb3..21913a22 100644 --- a/src/service/request/instance.ts +++ b/src/service/request/instance.ts @@ -7,7 +7,7 @@ import { handleAxiosError, handleResponseError, handleBackendError, - handleServiceResult + handleServiceResult, } from '@/utils'; import { refreshToken } from './helpers'; @@ -31,7 +31,7 @@ export default class CustomAxiosInstance { codeKey: 'code', dataKey: 'data', msgKey: 'message', - successCode: 200 + successCode: 200, } ) { this.backendConfig = backendConfig; @@ -42,7 +42,7 @@ export default class CustomAxiosInstance { /** 设置请求拦截器 */ setInterceptor() { this.instance.interceptors.request.use( - async config => { + async (config) => { const handleConfig = { ...config }; if (handleConfig.headers) { // 数据转换 @@ -59,7 +59,7 @@ export default class CustomAxiosInstance { } ); this.instance.interceptors.response.use( - async response => { + async (response) => { const { status } = response; if (status === 200 || status < 300 || status === 304) { const backend = response.data; diff --git a/src/service/request/request.ts b/src/service/request/request.ts index aa66dd6c..43ff3621 100644 --- a/src/service/request/request.ts +++ b/src/service/request/request.ts @@ -85,7 +85,7 @@ export function createRequest(axiosConfig: AxiosRequestConfig, backendConfig?: S get, post, put, - delete: handleDelete + delete: handleDelete, }; } @@ -138,7 +138,7 @@ export function createHookRequest(axiosConfig: AxiosRequestConfig, backendConfig data, error, loading, - network + network, }; } @@ -183,7 +183,7 @@ export function createHookRequest(axiosConfig: AxiosRequestConfig, backendConfig get, post, put, - delete: handleDelete + delete: handleDelete, }; } diff --git a/src/settings/color.ts b/src/settings/color.ts index b14fbb7b..0fbc8576 100644 --- a/src/settings/color.ts +++ b/src/settings/color.ts @@ -13,8 +13,8 @@ interface TraditionColor { export const traditionColors = colorJson as TraditionColor[]; export function isInTraditionColors(color: string) { - return traditionColors.some(item => { - const flag = item.data.some(v => v.color === color); + return traditionColors.some((item) => { + const flag = item.data.some((v) => v.color === color); return flag; }); } diff --git a/src/settings/theme.ts b/src/settings/theme.ts index e3340ec3..7b1d2e26 100644 --- a/src/settings/theme.ts +++ b/src/settings/theme.ts @@ -26,7 +26,7 @@ const themeColorList = [ '#ffb300', '#fdd835', '#6d4c41', - '#546e7a' + '#546e7a', ]; const defaultThemeSetting: ThemeSetting = { @@ -38,8 +38,8 @@ const defaultThemeSetting: ThemeSetting = { { value: 'vertical', label: EnumThemeLayoutMode.vertical }, { value: 'vertical-mix', label: EnumThemeLayoutMode['vertical-mix'] }, { value: 'horizontal', label: EnumThemeLayoutMode.horizontal }, - { value: 'horizontal-mix', label: EnumThemeLayoutMode['horizontal-mix'] } - ] + { value: 'horizontal-mix', label: EnumThemeLayoutMode['horizontal-mix'] }, + ], }, themeColor: themeColorList[0], themeColorList, @@ -47,7 +47,7 @@ const defaultThemeSetting: ThemeSetting = { info: '#2080f0', success: '#52c41a', warning: '#faad14', - error: '#f5222d' + error: '#f5222d', }, isCustomizeInfoColor: false, fixedHeaderAndTab: true, @@ -56,8 +56,8 @@ const defaultThemeSetting: ThemeSetting = { height: 56, crumb: { visible: true, - showIcon: true - } + showIcon: true, + }, }, tab: { visible: true, @@ -65,28 +65,28 @@ const defaultThemeSetting: ThemeSetting = { mode: 'chrome', modeList: [ { value: 'chrome', label: EnumThemeTabMode.chrome }, - { value: 'button', label: EnumThemeTabMode.button } + { value: 'button', label: EnumThemeTabMode.button }, ], - isCache: true + isCache: true, }, sider: { width: 220, collapsedWidth: 64, mixWidth: 80, mixCollapsedWidth: 48, - mixChildMenuWidth: 200 + mixChildMenuWidth: 200, }, menu: { horizontalPosition: 'flex-start', horizontalPositionList: [ { value: 'flex-start', label: EnumThemeHorizontalMenuPosition['flex-start'] }, { value: 'center', label: EnumThemeHorizontalMenuPosition.center }, - { value: 'flex-end', label: EnumThemeHorizontalMenuPosition['flex-end'] } - ] + { value: 'flex-end', label: EnumThemeHorizontalMenuPosition['flex-end'] }, + ], }, footer: { fixed: false, - height: 48 + height: 48, }, page: { animate: true, @@ -97,9 +97,9 @@ const defaultThemeSetting: ThemeSetting = { { value: 'fade-bottom', label: EnumThemeAnimateMode['fade-bottom'] }, { value: 'fade-scale', label: EnumThemeAnimateMode['fade-scale'] }, { value: 'zoom-fade', label: EnumThemeAnimateMode['zoom-fade'] }, - { value: 'zoom-out', label: EnumThemeAnimateMode['zoom-out'] } - ] - } + { value: 'zoom-out', label: EnumThemeAnimateMode['zoom-out'] }, + ], + }, }; export const themeSetting = (jsonSetting as ThemeSetting) || defaultThemeSetting; diff --git a/src/store/modules/app/index.ts b/src/store/modules/app/index.ts index b07be818..0356960e 100644 --- a/src/store/modules/app/index.ts +++ b/src/store/modules/app/index.ts @@ -17,7 +17,7 @@ export const useAppStore = defineStore('app-store', { reloadFlag: true, settingDrawerVisible: false, siderCollapse: false, - mixSiderFixed: false + mixSiderFixed: false, }), actions: { /** @@ -65,6 +65,6 @@ export const useAppStore = defineStore('app-store', { /** 设置 vertical-mix模式下 侧边栏的固定状态 */ toggleMixSiderFixed() { this.mixSiderFixed = !this.mixSiderFixed; - } - } + }, + }, }); diff --git a/src/store/modules/auth/index.ts b/src/store/modules/auth/index.ts index 422ab206..59375ad8 100644 --- a/src/store/modules/auth/index.ts +++ b/src/store/modules/auth/index.ts @@ -18,13 +18,13 @@ export const useAuthStore = defineStore('auth-store', { state: (): AuthState => ({ userInfo: getUserInfo(), token: getToken(), - loginLoding: false + loginLoding: false, }), getters: { /** 是否登录 */ isLogin(state) { return Boolean(state.token); - } + }, }, actions: { /** 重置auth状态 */ @@ -67,7 +67,7 @@ export const useAuthStore = defineStore('auth-store', { window.$notification?.success({ title: '登录成功!', content: `欢迎回来,${data.userName}!`, - duration: 3000 + duration: 3000, }); } else { // 不成功则重置状态 @@ -87,6 +87,6 @@ export const useAuthStore = defineStore('auth-store', { await this.loginByToken(data); } this.loginLoding = false; - } - } + }, + }, }); diff --git a/src/store/modules/route/index.ts b/src/store/modules/route/index.ts index 2bd2f7b7..f19b0b11 100644 --- a/src/store/modules/route/index.ts +++ b/src/store/modules/route/index.ts @@ -6,7 +6,7 @@ import { transformAuthRouteToMenu, transformAuthRoutesToVueRoutes, transformAuthRoutesToSearchMenus, - getCacheRoutes + getCacheRoutes, } from '@/utils'; import type { GlobalMenuOption, SearchMenu } from '@/interface'; import { useTabStore } from '../tab'; @@ -30,7 +30,7 @@ export const useRouteStore = defineStore('route-store', { routeHomeName: 'dashboard_analysis', menus: [], searchMenus: [], - cacheRoutes: [] + cacheRoutes: [], }), actions: { /** @@ -49,7 +49,7 @@ export const useRouteStore = defineStore('route-store', { this.searchMenus = transformAuthRoutesToSearchMenus(data.routes); const vueRoutes = transformAuthRoutesToVueRoutes(data.routes); - vueRoutes.forEach(route => { + vueRoutes.forEach((route) => { router.addRoute(route); }); @@ -58,6 +58,6 @@ export const useRouteStore = defineStore('route-store', { initHomeTab(data.home, router); this.isAddedDynamicRoute = true; } - } - } + }, + }, }); diff --git a/src/store/modules/tab/helpers.ts b/src/store/modules/tab/helpers.ts index 79b969d5..e573856b 100644 --- a/src/store/modules/tab/helpers.ts +++ b/src/store/modules/tab/helpers.ts @@ -12,8 +12,8 @@ export function getTabRouteByVueRoute(route: RouteRecordNormalized | RouteLocati meta: route.meta, scrollPosition: { left: 0, - top: 0 - } + top: 0, + }, }; return tabRoute; } @@ -24,7 +24,7 @@ export function getTabRouteByVueRoute(route: RouteRecordNormalized | RouteLocati * @param path - 该页签的路径 */ export function getIndexInTabRoutes(tabs: GlobalTabRoute[], path: string) { - return tabs.findIndex(tab => tab.path === path); + return tabs.findIndex((tab) => tab.path === path); } /** diff --git a/src/store/modules/tab/index.ts b/src/store/modules/tab/index.ts index eb7d54e2..b87b7f81 100644 --- a/src/store/modules/tab/index.ts +++ b/src/store/modules/tab/index.ts @@ -22,21 +22,21 @@ export const useTabStore = defineStore('tab-store', { name: 'root', path: '/', meta: { - title: 'root' + title: 'root', }, scrollPosition: { left: 0, - top: 0 - } + top: 0, + }, }, - activeTab: '' + activeTab: '', }), getters: { /** 当前激活状态的页签索引 */ activeTabIndex(state) { const { tabs, activeTab } = state; - return tabs.findIndex(tab => tab.path === activeTab); - } + return tabs.findIndex((tab) => tab.path === activeTab); + }, }, actions: { /** @@ -53,7 +53,7 @@ export const useTabStore = defineStore('tab-store', { */ initHomeTab(routeHomeName: string, router: Router) { const routes = router.getRoutes(); - const findHome = routes.find(item => item.name === routeHomeName); + const findHome = routes.find((item) => item.name === routeHomeName); if (findHome) { this.homeTab = getTabRouteByVueRoute(findHome); } @@ -75,7 +75,7 @@ export const useTabStore = defineStore('tab-store', { const { routerPush } = useRouterPush(false); const isActive = this.activeTab === path; - const updateTabs = this.tabs.filter(tab => tab.path !== path); + const updateTabs = this.tabs.filter((tab) => tab.path !== path); this.tabs = updateTabs; if (isActive && updateTabs.length) { const activePath = updateTabs[updateTabs.length - 1].path; @@ -93,7 +93,7 @@ export const useTabStore = defineStore('tab-store', { const homePath = this.homeTab.path; const remain = [homePath, ...excludes]; const hasActive = remain.includes(this.activeTab); - const updateTabs = this.tabs.filter(tab => remain.includes(tab.path)); + const updateTabs = this.tabs.filter((tab) => remain.includes(tab.path)); this.tabs = updateTabs; if (!hasActive && updateTabs.length) { const activePath = updateTabs[updateTabs.length - 1].path; @@ -108,7 +108,7 @@ export const useTabStore = defineStore('tab-store', { clearLeftTab(path: string) { const index = getIndexInTabRoutes(this.tabs, path); if (index > -1) { - const excludes = this.tabs.slice(index).map(item => item.path); + const excludes = this.tabs.slice(index).map((item) => item.path); this.clearTab(excludes); } }, @@ -119,7 +119,7 @@ export const useTabStore = defineStore('tab-store', { clearRightTab(path: string) { const index = getIndexInTabRoutes(this.tabs, path); if (index > -1) { - const excludes = this.tabs.slice(0, index + 1).map(item => item.path); + const excludes = this.tabs.slice(0, index + 1).map((item) => item.path); this.clearTab(excludes); } }, @@ -154,7 +154,7 @@ export const useTabStore = defineStore('tab-store', { getTabScrollPosition(path: string) { const position = { left: 0, - top: 0 + top: 0, }; const index = getIndexInTabRoutes(this.tabs, path); if (index > -1) { @@ -178,6 +178,6 @@ export const useTabStore = defineStore('tab-store', { } this.tabs = tabs; this.setActiveTab(currentRoute.path); - } - } + }, + }, }); diff --git a/src/store/modules/theme/helpers.ts b/src/store/modules/theme/helpers.ts index f0549d79..0b856336 100644 --- a/src/store/modules/theme/helpers.ts +++ b/src/store/modules/theme/helpers.ts @@ -26,17 +26,17 @@ interface ColorAction { /** 获取主题颜色的各种场景对应的颜色 */ function getThemeColors(colors: [ColorType, string][]) { const colorActions: ColorAction[] = [ - { scene: '', handler: color => color }, - { scene: 'Suppl', handler: color => color }, - { scene: 'Hover', handler: color => getColorPalette(color, 5) }, - { scene: 'Pressed', handler: color => getColorPalette(color, 7) }, - { scene: 'Active', handler: color => addColorAlpha(color, 0.1) } + { scene: '', handler: (color) => color }, + { scene: 'Suppl', handler: (color) => color }, + { scene: 'Hover', handler: (color) => getColorPalette(color, 5) }, + { scene: 'Pressed', handler: (color) => getColorPalette(color, 7) }, + { scene: 'Active', handler: (color) => addColorAlpha(color, 0.1) }, ]; const themeColor: ThemeColor = {}; - colors.forEach(color => { - colorActions.forEach(action => { + colors.forEach((color) => { + colorActions.forEach((action) => { const [colorType, colorValue] = color; const colorKey: ColorKey = `${colorType}Color${action.scene}`; themeColor[colorKey] = action.handler(colorValue); @@ -57,18 +57,18 @@ export function getNaiveThemeOverrides(colors: Record): Globa ['info', info], ['success', success], ['warning', warning], - ['error', error] + ['error', error], ]); const colorLoading = primary; return { common: { - ...themeColors + ...themeColors, }, LoadingBar: { - colorLoading - } + colorLoading, + }, }; } @@ -79,7 +79,7 @@ type ThemeVarsKeys = keyof ThemeVars; export function addThemeCssVarsToHtml(themeVars: ThemeVars) { const keys = Object.keys(themeVars) as ThemeVarsKeys[]; const style: string[] = []; - keys.forEach(key => { + keys.forEach((key) => { style.push(`--${kebabCase(key)}: ${themeVars[key]}`); }); const styleStr = style.join(';'); @@ -97,6 +97,6 @@ export function handleWindicssDarkMode() { } return { addDarkClass, - removeDarkClass + removeDarkClass, }; } diff --git a/src/store/modules/theme/index.ts b/src/store/modules/theme/index.ts index 085dea05..79cb9ce9 100644 --- a/src/store/modules/theme/index.ts +++ b/src/store/modules/theme/index.ts @@ -5,7 +5,7 @@ import type { ThemeLayoutMode, ThemeTabMode, ThemeHorizontalMenuPosition, - ThemeAnimateMode + ThemeAnimateMode, } from '@/interface'; import { getThemeSettings, getNaiveThemeOverrides, addThemeCssVarsToHtml } from './helpers'; @@ -17,13 +17,15 @@ export const useThemeStore = defineStore('theme-store', { /** naiveUI的主题配置 */ naiveThemeOverrides(state) { const overrides = getNaiveThemeOverrides({ primary: state.themeColor, ...state.otherColor }); - addThemeCssVarsToHtml(overrides.common!); + if (overrides.common) { + addThemeCssVarsToHtml(overrides.common); + } return overrides; }, /** naive-ui暗黑主题 */ naiveTheme(state) { return state.darkMode ? darkTheme : undefined; - } + }, }, actions: { /** 重置theme状态 */ @@ -133,6 +135,6 @@ export const useThemeStore = defineStore('theme-store', { /** 设置页面过渡动画类型 */ setPageAnimateMode(mode: ThemeAnimateMode) { this.page.animateMode = mode; - } - } + }, + }, }); diff --git a/src/store/subscribe/app.ts b/src/store/subscribe/app.ts index 8897984f..55780120 100644 --- a/src/store/subscribe/app.ts +++ b/src/store/subscribe/app.ts @@ -10,7 +10,7 @@ export default function subscribeAppStore() { // 弹窗打开时禁止滚动条 const stopHandle = watch( () => app.settingDrawerVisible, - newValue => { + (newValue) => { scrollBodyHandler(newValue); } ); diff --git a/src/store/subscribe/theme.ts b/src/store/subscribe/theme.ts index c802cbb6..88ac78b1 100644 --- a/src/store/subscribe/theme.ts +++ b/src/store/subscribe/theme.ts @@ -13,7 +13,7 @@ export default function subscribeThemeStore() { const stopThemeColor = watch( () => theme.themeColor, - newValue => { + (newValue) => { setThemeColor(newValue); }, { immediate: true } @@ -22,7 +22,7 @@ export default function subscribeThemeStore() { // 监听暗黑模式 const stopDarkMode = watch( () => theme.darkMode, - newValue => { + (newValue) => { if (newValue) { addDarkClass(); } else { @@ -34,7 +34,7 @@ export default function subscribeThemeStore() { // 监听操作系统主题模式 const stopOsTheme = watch( osTheme, - newValue => { + (newValue) => { const isDark = newValue === 'dark'; theme.setDarkMode(isDark); }, @@ -42,7 +42,7 @@ export default function subscribeThemeStore() { ); // 禁用横向滚动(页面切换时,过渡动画会产生水平方向的滚动条, 小于最小宽度时,不禁止) - const stopWidth = watch(width, newValue => { + const stopWidth = watch(width, (newValue) => { if (newValue < theme.layout.minWidth) { document.documentElement.style.overflowX = 'auto'; } else { @@ -69,6 +69,6 @@ function handleWindicssDarkMode() { } return { addDarkClass, - removeDarkClass + removeDarkClass, }; } diff --git a/src/typings/common/env.d.ts b/src/typings/common/env.d.ts index 3b34a240..f736c8e2 100644 --- a/src/typings/common/env.d.ts +++ b/src/typings/common/env.d.ts @@ -3,7 +3,7 @@ declare module '*.vue' { import { DefineComponent } from 'vue'; - const component: DefineComponent<{}, {}, any>; + const component: DefineComponent; export default component; } diff --git a/src/typings/common/route.d.ts b/src/typings/common/route.d.ts index 7f7bd797..f2c6de61 100644 --- a/src/typings/common/route.d.ts +++ b/src/typings/common/route.d.ts @@ -136,11 +136,12 @@ declare namespace AuthRoute { | `${Path}/:module(${string})?`; /** 获取一级路由(包括有子路由的一级路由) */ - type GetSingleRouteKey = - Key extends `${infer IgnoredLeft}${RouteSplitMark}${infer IgnoredRight}` ? never : Key; + type GetSingleRouteKey = Key extends `${infer _Left}${RouteSplitMark}${infer _Right}` + ? never + : Key; /** 获取子路由的一级父路由 */ - type GetRouteFirstParentKey = Key extends `${infer Left}${RouteSplitMark}${infer IgnoredRight}` + type GetRouteFirstParentKey = Key extends `${infer Left}${RouteSplitMark}${infer _Right}` ? Left : never; } diff --git a/src/typings/common/window.d.ts b/src/typings/common/window.d.ts index bc7f221e..8fba0b75 100644 --- a/src/typings/common/window.d.ts +++ b/src/typings/common/window.d.ts @@ -2,7 +2,7 @@ import type { LoadingBarProviderInst, DialogProviderInst, MessageProviderInst, - NotificationProviderInst + NotificationProviderInst, } from 'naive-ui'; declare global { diff --git a/src/utils/auth/user.ts b/src/utils/auth/user.ts index 48783e37..5f127c6f 100644 --- a/src/utils/auth/user.ts +++ b/src/utils/auth/user.ts @@ -37,7 +37,7 @@ export function getUserInfo() { userId: '', userName: '', userPhone: '', - userRole: 'visitor' + userRole: 'visitor', }; const userInfo: Auth.UserInfo = getLocal(EnumStorageKey['user-info']) || emptyInfo; return userInfo; diff --git a/src/utils/common/color.ts b/src/utils/common/color.ts index a249367b..c06e5fd0 100644 --- a/src/utils/common/color.ts +++ b/src/utils/common/color.ts @@ -30,7 +30,7 @@ export function getColorPalette(color: string, index: ColorIndex) { const newHsv: HsvColor = { h: getHue(hsv, i, isLight), s: getSaturation(hsv, i, isLight), - v: getValue(hsv, i, isLight) + v: getValue(hsv, i, isLight), }; return colord(newHsv).toHex(); @@ -42,7 +42,7 @@ export function getColorPalette(color: string, index: ColorIndex) { */ export function getAllColorPalette(color: string) { const indexs: ColorIndex[] = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]; - return indexs.map(index => getColorPalette(color, index)); + return indexs.map((index) => getColorPalette(color, index)); } /** diff --git a/src/utils/common/design-pattern.ts b/src/utils/common/design-pattern.ts index 6afdda48..2de5d3d3 100644 --- a/src/utils/common/design-pattern.ts +++ b/src/utils/common/design-pattern.ts @@ -1,6 +1,6 @@ /** 执行策略模式 */ export function exeStrategyActions(actions: Common.StrategyAction[]) { - actions.some(item => { + actions.some((item) => { const [flag, action] = item; if (flag) { action(); diff --git a/src/utils/common/number.ts b/src/utils/common/number.ts index 1d23196c..04a9d4bb 100644 --- a/src/utils/common/number.ts +++ b/src/utils/common/number.ts @@ -27,7 +27,7 @@ export function transformToTimeCountDown(seconds: number) { * @param start - 开始范围 * @param end - 结束范围 */ -export function getRandomInterger(end: number, start: number = 0) { +export function getRandomInterger(end: number, start = 0) { const range = end - start; const random = Math.floor(Math.random() * range + start); return random; diff --git a/src/utils/form/rule.ts b/src/utils/form/rule.ts index 1366b5b2..94ef1434 100644 --- a/src/utils/form/rule.ts +++ b/src/utils/form/rule.ts @@ -18,17 +18,17 @@ interface CustomFormRules { export const formRules: CustomFormRules = { phone: [ { required: true, message: '请输入手机号码' }, - { pattern: REGEXP_PHONE, message: '手机号码格式错误', trigger: 'input' } + { pattern: REGEXP_PHONE, message: '手机号码格式错误', trigger: 'input' }, ], pwd: [ { required: true, message: '请输入密码' }, - { pattern: REGEXP_PWD, message: '密码为8-18位数字/字符/符号,至少2种组合', trigger: 'input' } + { pattern: REGEXP_PWD, message: '密码为8-18位数字/字符/符号,至少2种组合', trigger: 'input' }, ], code: [ { required: true, message: '请输入验证码' }, - { pattern: REGEXP_CODE_SIX, message: '验证码格式错误', trigger: 'input' } + { pattern: REGEXP_CODE_SIX, message: '验证码格式错误', trigger: 'input' }, ], - email: [{ pattern: REGEXP_EMAIL, message: '邮箱格式错误', trigger: 'blur' }] + email: [{ pattern: REGEXP_EMAIL, message: '邮箱格式错误', trigger: 'blur' }], }; /** 获取确认密码的表单规则 */ @@ -43,8 +43,8 @@ export function getConfirmPwdRule(pwd: Ref) { return Promise.resolve(); }, message: '输入的值与密码不一致', - trigger: 'input' - } + trigger: 'input', + }, ]; return confirmPwdRule; } @@ -61,8 +61,8 @@ export function getImgCodeRule(imgCode: Ref) { return Promise.resolve(); }, message: '验证码不正确', - trigger: 'blur' - } + trigger: 'blur', + }, ]; return imgCodeRule; } diff --git a/src/utils/router/breadcrumb.ts b/src/utils/router/breadcrumb.ts index 020e4740..2491a97f 100644 --- a/src/utils/router/breadcrumb.ts +++ b/src/utils/router/breadcrumb.ts @@ -8,7 +8,7 @@ import type { GlobalMenuOption, GlobalBreadcrumb } from '@/interface'; */ export function getBreadcrumbByRouteKey(activeKey: string, menus: GlobalMenuOption[], rootPath: string) { const breadcrumbMenu = getBreadcrumbMenu(activeKey, menus); - const breadcrumb = breadcrumbMenu.map(item => transformBreadcrumbMenuToBreadcrumb(item, rootPath)); + const breadcrumb = breadcrumbMenu.map((item) => transformBreadcrumbMenuToBreadcrumb(item, rootPath)); return breadcrumb; } @@ -19,7 +19,7 @@ export function getBreadcrumbByRouteKey(activeKey: string, menus: GlobalMenuOpti */ function getBreadcrumbMenu(activeKey: string, menus: GlobalMenuOption[]) { const breadcrumbMenu: GlobalMenuOption[] = []; - menus.some(menu => { + menus.some((menu) => { const flag = activeKey.includes(menu.routeName); if (flag) { breadcrumbMenu.push(...getBreadcrumbMenuItem(activeKey, menu)); @@ -42,7 +42,7 @@ function getBreadcrumbMenuItem(activeKey: string, menu: GlobalMenuOption) { if (activeKey.includes(menu.routeName) && menu.children && menu.children.length) { breadcrumbMenu.push(menu); breadcrumbMenu.push( - ...menu.children.map(item => getBreadcrumbMenuItem(activeKey, item as GlobalMenuOption)).flat(1) + ...menu.children.map((item) => getBreadcrumbMenuItem(activeKey, item as GlobalMenuOption)).flat(1) ); } @@ -61,13 +61,13 @@ function transformBreadcrumbMenuToBreadcrumb(menu: GlobalMenuOption, rootPath: s label: menu.label as string, routeName: menu.routeName, disabled: menu.routePath === rootPath, - hasChildren + hasChildren, }; if (menu.icon) { breadcrumb.icon = menu.icon; } if (hasChildren) { - breadcrumb.children = menu.children?.map(item => + breadcrumb.children = menu.children?.map((item) => transformBreadcrumbMenuToBreadcrumb(item as GlobalMenuOption, rootPath) ); } diff --git a/src/utils/router/cache.ts b/src/utils/router/cache.ts index 2b4740b5..b8f73d57 100644 --- a/src/utils/router/cache.ts +++ b/src/utils/router/cache.ts @@ -6,10 +6,10 @@ import type { RouteRecordRaw } from 'vue-router'; */ export function getCacheRoutes(routes: RouteRecordRaw[]) { const cacheNames: string[] = []; - routes.forEach(route => { + routes.forEach((route) => { // 只需要获取二级路由的缓存的组件名 if (hasChildren(route)) { - route.children!.forEach(item => { + (route.children as RouteRecordRaw[]).forEach((item) => { if (isKeepAlive(item)) { cacheNames.push(item.name as string); } diff --git a/src/utils/router/component.ts b/src/utils/router/component.ts index e7bff664..81cb4d9b 100644 --- a/src/utils/router/component.ts +++ b/src/utils/router/component.ts @@ -13,7 +13,7 @@ type LayoutComponent = Record Promise>; export function getLayoutComponent(layoutType: LayoutComponentName) { const layoutComponent: LayoutComponent = { basic: BasicLayout, - blank: BlankLayout + blank: BlankLayout, }; return () => setViewComponentName(layoutComponent[layoutType], EnumLayoutComponentName[layoutType]); } diff --git a/src/utils/router/helpers.ts b/src/utils/router/helpers.ts index 6867e91d..d7036c4e 100644 --- a/src/utils/router/helpers.ts +++ b/src/utils/router/helpers.ts @@ -10,7 +10,7 @@ type ComponentAction = Record void>; * @description 所有多级路由都会被转换成二级路由 */ export function transformAuthRoutesToVueRoutes(routes: AuthRoute.Route[]) { - return routes.map(route => transformAuthRouteToVueRoute(route)).flat(1); + return routes.map((route) => transformAuthRouteToVueRoute(route)).flat(1); } /** @@ -70,10 +70,14 @@ function transformAuthRouteToVueRoute(item: AuthRoute.Route) { }, self() { itemRoute.component = getViewComponent(item.name); - } + }, }; try { - action[item.component!](); + if (item.component) { + action[item.component](); + } else { + consoleError('路由组件解析失败: ', item); + } } catch { consoleError('路由组件解析失败: ', item); } @@ -91,8 +95,8 @@ function transformAuthRouteToVueRoute(item: AuthRoute.Route) { { path: '', name: item.name, - component: getViewComponent('not-found-page') - } + component: getViewComponent('not-found-page'), + }, ]; } else { const parentPath = `${itemRoute.path}-parent` as AuthRoute.SingleRouteParentPath; @@ -103,7 +107,7 @@ function transformAuthRouteToVueRoute(item: AuthRoute.Route) { path: parentPath, component: layout, redirect: item.path, - children: [itemRoute] + children: [itemRoute], }; return [parentRoute]; @@ -112,10 +116,10 @@ function transformAuthRouteToVueRoute(item: AuthRoute.Route) { // 子路由 if (hasChildren(item)) { - const children = item.children!.map(child => transformAuthRouteToVueRoute(child)).flat(); + const children = (item.children as AuthRoute.Route[]).map((child) => transformAuthRouteToVueRoute(child)).flat(); // 找出第一个不为多级路由中间级的子路由路径作为重定向路径 - const redirectPath: AuthRoute.RoutePath = (children.find(item => !item.meta?.multi)?.path || + const redirectPath: AuthRoute.RoutePath = (children.find((v) => !v.meta?.multi)?.path || '/') as AuthRoute.RoutePath; if (redirectPath === '/') { consoleError('该多级路由没有有效的子路径', item); diff --git a/src/utils/router/menu.ts b/src/utils/router/menu.ts index 90bfeac6..d9cc4b04 100644 --- a/src/utils/router/menu.ts +++ b/src/utils/router/menu.ts @@ -24,7 +24,7 @@ function addPartialProps(menuItem: GlobalMenuOption, icon?: string, children?: G */ export function transformAuthRouteToMenu(routes: AuthRoute.Route[]): GlobalMenuOption[] { const globalMenu: GlobalMenuOption[] = []; - routes.forEach(route => { + routes.forEach((route) => { const { name, path, meta } = route; const routeName = name as string; let menuChildren: GlobalMenuOption[] | undefined; @@ -36,7 +36,7 @@ export function transformAuthRouteToMenu(routes: AuthRoute.Route[]): GlobalMenuO key: routeName, label: meta.title, routeName, - routePath: path + routePath: path, }, meta?.icon, menuChildren @@ -56,7 +56,7 @@ export function transformAuthRouteToMenu(routes: AuthRoute.Route[]): GlobalMenuO * @param menus - 菜单数据 */ export function getActiveKeyPathsOfMenus(activeKey: string, menus: GlobalMenuOption[]) { - const keys = menus.map(menu => getActiveKeyPathsOfMenu(activeKey, menu)).flat(1); + const keys = menus.map((menu) => getActiveKeyPathsOfMenu(activeKey, menu)).flat(1); return keys; } @@ -66,7 +66,7 @@ function getActiveKeyPathsOfMenu(activeKey: string, menu: GlobalMenuOption) { keys.push(menu.routeName); } if (menu.children) { - keys.push(...menu.children.map(item => getActiveKeyPathsOfMenu(activeKey, item)).flat(1)); + keys.push(...menu.children.map((item) => getActiveKeyPathsOfMenu(activeKey, item)).flat(1)); } return keys; } diff --git a/src/utils/router/tab.ts b/src/utils/router/tab.ts index 7247a639..a681ff3d 100644 --- a/src/utils/router/tab.ts +++ b/src/utils/router/tab.ts @@ -12,12 +12,12 @@ export function getTabRoutes() { const routes: GlobalTabRoute[] = []; const data = getLocal(EnumStorageKey['tab-routes']); if (data) { - const defaultTabRoutes = data.map(item => ({ + const defaultTabRoutes = data.map((item) => ({ ...item, scrollPosition: { left: 0, - top: 0 - } + top: 0, + }, })); routes.push(...defaultTabRoutes); } diff --git a/src/utils/service/error.ts b/src/utils/service/error.ts index 3f1e3c2a..a9a0de1f 100644 --- a/src/utils/service/error.ts +++ b/src/utils/service/error.ts @@ -6,7 +6,7 @@ import { NETWORK_ERROR_MSG, REQUEST_TIMEOUT_CODE, REQUEST_TIMEOUT_MSG, - ERROR_STATUS + ERROR_STATUS, } from '@/config'; import { exeStrategyActions } from '../common'; import { showErrorMsg } from './msg'; @@ -21,7 +21,7 @@ export function handleAxiosError(axiosError: AxiosError) { const error: Service.RequestError = { type: 'axios', code: DEFAULT_REQUEST_ERROR_CODE, - msg: DEFAULT_REQUEST_ERROR_MSG + msg: DEFAULT_REQUEST_ERROR_MSG, }; const actions: Common.StrategyAction[] = [ @@ -30,14 +30,14 @@ export function handleAxiosError(axiosError: AxiosError) { !window.navigator.onLine || axiosError.message === 'Network Error', () => { Object.assign(error, { code: NETWORK_ERROR_CODE, msg: NETWORK_ERROR_MSG }); - } + }, ], [ // 超时错误 axiosError.code === REQUEST_TIMEOUT_CODE && axiosError.message.includes('timeout'), () => { Object.assign(error, { code: REQUEST_TIMEOUT_CODE, msg: REQUEST_TIMEOUT_MSG }); - } + }, ], [ // 请求不成功的错误 @@ -46,8 +46,8 @@ export function handleAxiosError(axiosError: AxiosError) { const errorCode: ErrorStatus = (axiosError.response?.status as ErrorStatus) || 'DEFAULT'; const msg = ERROR_STATUS[errorCode]; Object.assign(error, { code: errorCode, msg }); - } - ] + }, + ], ]; exeStrategyActions(actions); @@ -65,7 +65,7 @@ export function handleResponseError(response: AxiosResponse) { const error: Service.RequestError = { type: 'axios', code: DEFAULT_REQUEST_ERROR_CODE, - msg: DEFAULT_REQUEST_ERROR_MSG + msg: DEFAULT_REQUEST_ERROR_MSG, }; if (!window.navigator.onLine) { @@ -92,7 +92,7 @@ export function handleBackendError(backendResult: Record, config: S const error: Service.RequestError = { type: 'backend', code: backendResult[codeKey], - msg: backendResult[msgKey] + msg: backendResult[msgKey], }; showErrorMsg(error); diff --git a/src/utils/service/handler.ts b/src/utils/service/handler.ts index 2e8da924..a0bdc091 100644 --- a/src/utils/service/handler.ts +++ b/src/utils/service/handler.ts @@ -3,13 +3,13 @@ export async function handleServiceResult(error: Service.RequestError | if (error) { const fail: Service.FailedResult = { error, - data: null + data: null, }; return fail; } const success: Service.SuccessResult = { error: null, - data + data, }; return success; } diff --git a/src/utils/service/transform.ts b/src/utils/service/transform.ts index 52e17f36..0a9f4c10 100644 --- a/src/utils/service/transform.ts +++ b/src/utils/service/transform.ts @@ -34,7 +34,7 @@ async function transformFile(file: File[] | File, key: string) { if (isArray(file)) { // 多文件 await Promise.all( - (file as File[]).map(item => { + (file as File[]).map((item) => { formData.append(key, item); return true; }) diff --git a/src/views/about/model.ts b/src/views/about/model.ts index a1ae9e4f..91c4faf6 100644 --- a/src/views/about/model.ts +++ b/src/views/about/model.ts @@ -27,13 +27,13 @@ function transformVersionData(tuple: [string, string]): PkgVersionInfo { const [name, version] = tuple; return { name, - version + version, }; } export const pkgJson: PkgJson = { name: pkgWithType.name, version: pkgWithType.version, - dependencies: Object.entries(pkgWithType.dependencies).map(item => transformVersionData(item)), - devDependencies: Object.entries(pkgWithType.devDependencies).map(item => transformVersionData(item)) + dependencies: Object.entries(pkgWithType.dependencies).map((item) => transformVersionData(item)), + devDependencies: Object.entries(pkgWithType.devDependencies).map((item) => transformVersionData(item)), }; diff --git a/src/views/component/button/index.vue b/src/views/component/button/index.vue index 9cb45a3b..3577a306 100644 --- a/src/views/component/button/index.vue +++ b/src/views/component/button/index.vue @@ -63,40 +63,40 @@ const buttonExample: ButtonExample[] = [ { id: 0, props: {}, - label: 'Default' + label: 'Default', }, { id: 1, props: { type: 'tertiary' }, - label: 'Tertiary' + label: 'Tertiary', }, { id: 2, props: { type: 'primary' }, - label: 'Primary' + label: 'Primary', }, { id: 3, props: { type: 'info' }, - label: 'Info' + label: 'Info', }, { id: 4, props: { type: 'success' }, - label: 'Success' + label: 'Success', }, { id: 5, props: { type: 'warning' }, - label: 'Warning' + label: 'Warning', }, { id: 6, props: { type: 'error' }, - label: 'Error' - } + label: 'Error', + }, ], - desc: '按钮的 type 分别为 default、primary、info、success、warning 和 error。' + desc: '按钮的 type 分别为 default、primary、info、success、warning 和 error。', }, { id: 1, @@ -105,74 +105,74 @@ const buttonExample: ButtonExample[] = [ { id: 0, props: { strong: true, secondary: true }, - label: 'Default' + label: 'Default', }, { id: 1, props: { strong: true, secondary: true, type: 'tertiary' }, - label: 'Tertiary' + label: 'Tertiary', }, { id: 2, props: { strong: true, secondary: true, type: 'primary' }, - label: 'Primary' + label: 'Primary', }, { id: 3, props: { strong: true, secondary: true, type: 'info' }, - label: 'Info' + label: 'Info', }, { id: 4, props: { strong: true, secondary: true, type: 'success' }, - label: 'Success' + label: 'Success', }, { id: 5, props: { strong: true, secondary: true, type: 'warning' }, - label: 'Warning' + label: 'Warning', }, { id: 6, props: { strong: true, secondary: true, type: 'error' }, - label: 'Error' + label: 'Error', }, { id: 7, props: { strong: true, secondary: true, round: true }, - label: 'Default' + label: 'Default', }, { id: 8, props: { strong: true, secondary: true, round: true, type: 'tertiary' }, - label: 'Tertiary' + label: 'Tertiary', }, { id: 9, props: { strong: true, secondary: true, round: true, type: 'primary' }, - label: 'Primary' + label: 'Primary', }, { id: 10, props: { strong: true, secondary: true, round: true, type: 'info' }, - label: 'Info' + label: 'Info', }, { id: 11, props: { strong: true, secondary: true, round: true, type: 'success' }, - label: 'Success' + label: 'Success', }, { id: 12, props: { strong: true, secondary: true, round: true, type: 'warning' }, - label: 'Warning' + label: 'Warning', }, { id: 13, props: { strong: true, secondary: true, round: true, type: 'error' }, - label: 'Error' - } - ] + label: 'Error', + }, + ], }, { id: 2, @@ -181,64 +181,64 @@ const buttonExample: ButtonExample[] = [ { id: 0, props: { tertiary: true }, - label: 'Default' + label: 'Default', }, { id: 1, props: { tertiary: true, type: 'primary' }, - label: 'Primary' + label: 'Primary', }, { id: 2, props: { tertiary: true, type: 'info' }, - label: 'Info' + label: 'Info', }, { id: 3, props: { tertiary: true, type: 'success' }, - label: 'Success' + label: 'Success', }, { id: 4, props: { tertiary: true, type: 'warning' }, - label: 'Warning' + label: 'Warning', }, { id: 5, props: { tertiary: true, type: 'error' }, - label: 'Error' + label: 'Error', }, { id: 6, props: { tertiary: true, round: true }, - label: 'Default' + label: 'Default', }, { id: 7, props: { tertiary: true, round: true, type: 'primary' }, - label: 'Primary' + label: 'Primary', }, { id: 8, props: { tertiary: true, round: true, type: 'info' }, - label: 'Info' + label: 'Info', }, { id: 9, props: { tertiary: true, round: true, type: 'success' }, - label: 'Success' + label: 'Success', }, { id: 10, props: { tertiary: true, round: true, type: 'warning' }, - label: 'Warning' + label: 'Warning', }, { id: 11, props: { tertiary: true, round: true, type: 'error' }, - label: 'Error' - } - ] + label: 'Error', + }, + ], }, { id: 3, @@ -247,64 +247,64 @@ const buttonExample: ButtonExample[] = [ { id: 0, props: { quaternary: true }, - label: 'Default' + label: 'Default', }, { id: 1, props: { quaternary: true, type: 'primary' }, - label: 'Primary' + label: 'Primary', }, { id: 2, props: { quaternary: true, type: 'info' }, - label: 'Info' + label: 'Info', }, { id: 3, props: { quaternary: true, type: 'success' }, - label: 'Success' + label: 'Success', }, { id: 4, props: { quaternary: true, type: 'warning' }, - label: 'Warning' + label: 'Warning', }, { id: 5, props: { quaternary: true, type: 'error' }, - label: 'Error' + label: 'Error', }, { id: 6, props: { quaternary: true, round: true }, - label: 'Default' + label: 'Default', }, { id: 7, props: { quaternary: true, round: true, type: 'primary' }, - label: 'Primary' + label: 'Primary', }, { id: 8, props: { quaternary: true, round: true, type: 'info' }, - label: 'Info' + label: 'Info', }, { id: 9, props: { quaternary: true, round: true, type: 'success' }, - label: 'Success' + label: 'Success', }, { id: 10, props: { quaternary: true, round: true, type: 'warning' }, - label: 'Warning' + label: 'Warning', }, { id: 11, props: { quaternary: true, round: true, type: 'error' }, - label: 'Error' - } - ] + label: 'Error', + }, + ], }, { id: 4, @@ -313,39 +313,39 @@ const buttonExample: ButtonExample[] = [ { id: 0, props: { dashed: true }, - label: 'Default' + label: 'Default', }, { id: 1, props: { dashed: true, type: 'tertiary' }, - label: 'Tertiary' + label: 'Tertiary', }, { id: 2, props: { dashed: true, type: 'primary' }, - label: 'Primary' + label: 'Primary', }, { id: 3, props: { dashed: true, type: 'info' }, - label: 'Info' + label: 'Info', }, { id: 4, props: { dashed: true, type: 'success' }, - label: 'Success' + label: 'Success', }, { id: 5, props: { dashed: true, type: 'warning' }, - label: 'Warning' + label: 'Warning', }, { id: 6, props: { dashed: true, type: 'error' }, - label: 'Error' - } - ] + label: 'Error', + }, + ], }, { id: 5, @@ -354,24 +354,24 @@ const buttonExample: ButtonExample[] = [ { id: 0, props: { size: 'tiny', strong: true }, - label: '小小' + label: '小小', }, { id: 1, props: { size: 'small', strong: true }, - label: '小' + label: '小', }, { id: 2, props: { size: 'medium', strong: true }, - label: '不小' + label: '不小', }, { id: 3, props: { size: 'large', strong: true }, - label: '不不小' - } - ] + label: '不不小', + }, + ], }, { id: 6, @@ -381,9 +381,9 @@ const buttonExample: ButtonExample[] = [ id: 0, props: { text: true }, label: '那车头依然吐着烟', - icon: 'mdi:train' - } - ] + icon: 'mdi:train', + }, + ], }, { id: 7, @@ -396,12 +396,12 @@ const buttonExample: ButtonExample[] = [ tag: 'a', href: 'https://github.com/honghuangdc/soybean-admin', target: '_blank', - type: 'primary' + type: 'primary', }, - label: 'soybean-admin' - } + label: 'soybean-admin', + }, ], - desc: '你可以把按钮渲染成不同的标签,比如 a标签 。' + desc: '你可以把按钮渲染成不同的标签,比如 a标签 。', }, { id: 8, @@ -410,12 +410,12 @@ const buttonExample: ButtonExample[] = [ { id: 0, props: { - disabled: true + disabled: true, }, - label: '不许点' - } + label: '不许点', + }, ], - desc: '按钮可以被禁用' + desc: '按钮可以被禁用', }, { id: 9, @@ -425,23 +425,23 @@ const buttonExample: ButtonExample[] = [ id: 0, props: { secondary: true, - strong: true + strong: true, }, label: '+100元', - icon: 'mdi:cash-100' + icon: 'mdi:cash-100', }, { id: 0, props: { iconPlacement: 'right', secondary: true, - strong: true + strong: true, }, label: '+100元', - icon: 'mdi:cash-100' - } + icon: 'mdi:cash-100', + }, ], - desc: '在按钮上使用图标。' + desc: '在按钮上使用图标。', }, { id: 10, @@ -450,24 +450,24 @@ const buttonExample: ButtonExample[] = [ { id: 0, props: { - circle: true + circle: true, }, - icon: 'mdi:cash-100' + icon: 'mdi:cash-100', }, { id: 1, props: { - round: true + round: true, }, - label: '圆角' + label: '圆角', }, { id: 2, props: {}, - label: '方' - } + label: '方', + }, ], - desc: '按钮拥有不同的形状。' + desc: '按钮拥有不同的形状。', }, { id: 11, @@ -476,40 +476,40 @@ const buttonExample: ButtonExample[] = [ { id: 0, props: { ghost: true }, - label: 'Default' + label: 'Default', }, { id: 1, props: { ghost: true, type: 'tertiary' }, - label: 'Tertiary' + label: 'Tertiary', }, { id: 2, props: { ghost: true, type: 'primary' }, - label: 'Primary' + label: 'Primary', }, { id: 3, props: { ghost: true, type: 'info' }, - label: 'Info' + label: 'Info', }, { id: 4, props: { ghost: true, type: 'success' }, - label: 'Success' + label: 'Success', }, { id: 5, props: { ghost: true, type: 'warning' }, - label: 'Warning' + label: 'Warning', }, { id: 6, props: { ghost: true, type: 'error' }, - label: 'Error' - } + label: 'Error', + }, ], - desc: 'Ghost 按钮有透明的背景。' + desc: 'Ghost 按钮有透明的背景。', }, { id: 12, @@ -518,58 +518,58 @@ const buttonExample: ButtonExample[] = [ { id: 0, props: { - color: '#8a2be2' + color: '#8a2be2', }, label: '#8a2be2', - icon: 'ic:baseline-color-lens' + icon: 'ic:baseline-color-lens', }, { id: 1, props: { - color: '#ff69b4' + color: '#ff69b4', }, label: '#ff69b4', - icon: 'ic:baseline-color-lens' + icon: 'ic:baseline-color-lens', }, { id: 2, props: { color: '#8a2be2', - ghost: true + ghost: true, }, label: '#8a2be2', - icon: 'ic:baseline-color-lens' + icon: 'ic:baseline-color-lens', }, { id: 3, props: { color: '#ff69b4', - ghost: true + ghost: true, }, label: '#ff69b4', - icon: 'ic:baseline-color-lens' + icon: 'ic:baseline-color-lens', }, { id: 4, props: { color: '#8a2be2', - text: true + text: true, }, label: '#8a2be2', - icon: 'ic:baseline-color-lens' + icon: 'ic:baseline-color-lens', }, { id: 5, props: { color: '#ff69b4', - text: true + text: true, }, label: '#ff69b4', - icon: 'ic:baseline-color-lens' - } + icon: 'ic:baseline-color-lens', + }, ], - desc: '这两个颜色看起来像毒蘑菇。' - } + desc: '这两个颜色看起来像毒蘑菇。', + }, ]; diff --git a/src/views/component/card/index.vue b/src/views/component/card/index.vue index 3510237f..b89ca3d1 100644 --- a/src/views/component/card/index.vue +++ b/src/views/component/card/index.vue @@ -23,7 +23,7 @@ title="卡片分段示例" :segmented="{ content: true, - footer: 'soft' + footer: 'soft', }" > diff --git a/src/views/component/table/index.vue b/src/views/component/table/index.vue index 966f2ee1..c266e750 100644 --- a/src/views/component/table/index.vue +++ b/src/views/component/table/index.vue @@ -33,16 +33,16 @@ const columns: DataTableColumn[] = [ { title: 'Name', key: 'name', - align: 'center' + align: 'center', }, { title: 'Age', - key: 'age' + key: 'age', }, { title: 'Address', - key: 'address' - } + key: 'address', + }, ]; const dataSource = ref([]); @@ -54,7 +54,7 @@ function createDataSource(): DataSource[] { return { name: `Name${index}`, age: getRandomInterger(30, 20), - address: '中国' + address: '中国', }; }); } diff --git a/src/views/dashboard/analysis/components/BottomPart/index.vue b/src/views/dashboard/analysis/components/BottomPart/index.vue index b2a2aba1..fe0d49e9 100644 --- a/src/views/dashboard/analysis/components/BottomPart/index.vue +++ b/src/views/dashboard/analysis/components/BottomPart/index.vue @@ -43,43 +43,43 @@ const timelines: TimelineData[] = [ { type: 'success', title: '成功', content: '哪里成功', time: '2021-10-10 20:46' }, { type: 'error', title: '错误', content: '哪里错误', time: '2021-10-10 20:46' }, { type: 'warning', title: '警告', content: '哪里警告', time: '2021-10-10 20:46' }, - { type: 'info', title: '信息', content: '是的', time: '2021-10-10 20:46' } + { type: 'info', title: '信息', content: '是的', time: '2021-10-10 20:46' }, ]; const columns = [ { title: 'Name', - key: 'name' + key: 'name', }, { title: 'Age', - key: 'age' + key: 'age', }, { title: 'Address', - key: 'address' + key: 'address', }, { title: 'Tags', key: 'tags', render(row: TableData) { - const tags = row.tags.map(tagKey => { + const tags = row.tags.map((tagKey) => { return h( NTag, { style: { - marginRight: '6px' + marginRight: '6px', }, - type: 'info' + type: 'info', }, { - default: () => tagKey + default: () => tagKey, } ); }); return tags; - } - } + }, + }, ]; const tableData: TableData[] = [ @@ -88,50 +88,50 @@ const tableData: TableData[] = [ name: 'John Brown', age: 32, address: 'New York No. 1 Lake Park', - tags: ['nice', 'developer'] + tags: ['nice', 'developer'], }, { key: 1, name: 'Jim Green', age: 42, address: 'London No. 1 Lake Park', - tags: ['wow'] + tags: ['wow'], }, { key: 2, name: 'Joe Black', age: 32, address: 'Sidney No. 1 Lake Park', - tags: ['cool', 'teacher'] + tags: ['cool', 'teacher'], }, { key: 3, name: 'Soybean', age: 25, address: 'China Shenzhen', - tags: ['handsome', 'programmer'] + tags: ['handsome', 'programmer'], }, { key: 4, name: 'John Brown', age: 32, address: 'New York No. 1 Lake Park', - tags: ['nice', 'developer'] + tags: ['nice', 'developer'], }, { key: 5, name: 'Jim Green', age: 42, address: 'London No. 1 Lake Park', - tags: ['wow'] + tags: ['wow'], }, { key: 6, name: 'Joe Black', age: 32, address: 'Sidney No. 1 Lake Park', - tags: ['cool', 'teacher'] - } + tags: ['cool', 'teacher'], + }, ]; diff --git a/src/views/dashboard/analysis/components/DataCard/components/GradientBg.vue b/src/views/dashboard/analysis/components/DataCard/components/GradientBg.vue index 5e467b85..b08ffdb8 100644 --- a/src/views/dashboard/analysis/components/DataCard/components/GradientBg.vue +++ b/src/views/dashboard/analysis/components/DataCard/components/GradientBg.vue @@ -16,7 +16,7 @@ interface Props { const props = withDefaults(defineProps(), { startColor: '#56cdf3', - endColor: '#719de3' + endColor: '#719de3', }); const gradientStyle = computed(() => `linear-gradient(to bottom right, ${props.startColor}, ${props.endColor})`); diff --git a/src/views/dashboard/analysis/components/DataCard/index.vue b/src/views/dashboard/analysis/components/DataCard/index.vue index e4abcf68..f8c7e553 100644 --- a/src/views/dashboard/analysis/components/DataCard/index.vue +++ b/src/views/dashboard/analysis/components/DataCard/index.vue @@ -38,7 +38,7 @@ const cardData: CardData[] = [ value: 1000000, unit: '', colors: ['#ec4786', '#b955a4'], - icon: 'ant-design:bar-chart-outlined' + icon: 'ant-design:bar-chart-outlined', }, { id: 'amount', @@ -46,7 +46,7 @@ const cardData: CardData[] = [ value: 234567.89, unit: '$', colors: ['#865ec0', '#5144b4'], - icon: 'ant-design:money-collect-outlined' + icon: 'ant-design:money-collect-outlined', }, { id: 'download', @@ -54,7 +54,7 @@ const cardData: CardData[] = [ value: 666666, unit: '', colors: ['#56cdf3', '#719de3'], - icon: 'carbon:document-download' + icon: 'carbon:document-download', }, { id: 'trade', @@ -62,8 +62,8 @@ const cardData: CardData[] = [ value: 999999, unit: '', colors: ['#fcbc25', '#f68057'], - icon: 'ant-design:trademark-circle-outlined' - } + icon: 'ant-design:trademark-circle-outlined', + }, ]; diff --git a/src/views/dashboard/analysis/components/TopChart/index.vue b/src/views/dashboard/analysis/components/TopChart/index.vue index 7aa57447..082c9372 100644 --- a/src/views/dashboard/analysis/components/TopChart/index.vue +++ b/src/views/dashboard/analysis/components/TopChart/index.vue @@ -50,54 +50,55 @@ function renderLineChart() { yField: 'value', seriesField: 'type', lineStyle: { - lineWidth: 4 + lineWidth: 4, }, area: { style: { - fill: 'l(270) 0:#ffffff 0.5:#7ec2f3 1:#1890ff' - } + fill: 'l(270) 0:#ffffff 0.5:#7ec2f3 1:#1890ff', + }, }, smooth: true, animation: { appear: { animation: 'wave-in', - duration: 2000 - } - } + duration: 2000, + }, + }, }); line.value.render(); } function renderPieChart() { - const data = [ + if (!pieRef.value) return; + const pieData = [ { type: '学习', value: 20 }, { type: '娱乐', value: 10 }, { type: '工作', value: 30 }, - { type: '休息', value: 40 } + { type: '休息', value: 40 }, ]; - pie.value = new Pie(pieRef.value!, { + pie.value = new Pie(pieRef.value, { appendPadding: 10, - data, + data: pieData, angleField: 'value', colorField: 'type', radius: 0.8, innerRadius: 0.65, meta: { value: { - formatter: v => `${v}%` - } + formatter: (v) => `${v}%`, + }, }, label: { type: 'inner', autoRotate: false, - formatter: ({ percent }) => `${(percent * 100).toFixed(0)}%` + formatter: ({ percent }) => `${(percent * 100).toFixed(0)}%`, }, statistic: undefined, pieStyle: { - radius: [20] + radius: [20], }, color: ['#025DF4', '#DB6BCF', '#2498D1', '#FF745A', '#007E99', '#FFA8A8', '#2391FF'], legend: { - position: 'bottom' + position: 'bottom', }, interactions: [ { type: 'element-selected' }, @@ -107,15 +108,15 @@ function renderPieChart() { cfg: { start: [ { trigger: 'element:mouseenter', action: 'pie-statistic:change' }, - { trigger: 'legend-item:mouseenter', action: 'pie-statistic:change' } + { trigger: 'legend-item:mouseenter', action: 'pie-statistic:change' }, ], end: [ { trigger: 'element:mouseleave', action: 'pie-statistic:reset' }, - { trigger: 'legend-item:mouseleave', action: 'pie-statistic:reset' } - ] - } - } - ] + { trigger: 'legend-item:mouseleave', action: 'pie-statistic:reset' }, + ], + }, + }, + ], }); pie.value.render(); diff --git a/src/views/dashboard/workbench/components/WorkbenchHeader/index.vue b/src/views/dashboard/workbench/components/WorkbenchHeader/index.vue index b109ff9f..19def16e 100644 --- a/src/views/dashboard/workbench/components/WorkbenchHeader/index.vue +++ b/src/views/dashboard/workbench/components/WorkbenchHeader/index.vue @@ -30,18 +30,18 @@ const statisticData: StatisticData[] = [ { id: 0, label: '项目数', - value: '25' + value: '25', }, { id: 1, label: '待办', - value: '4/16' + value: '4/16', }, { id: 2, label: '消息', - value: '12' - } + value: '12', + }, ]; diff --git a/src/views/dashboard/workbench/components/WorkbenchMain/index.vue b/src/views/dashboard/workbench/components/WorkbenchMain/index.vue index bec56d18..002a232e 100644 --- a/src/views/dashboard/workbench/components/WorkbenchMain/index.vue +++ b/src/views/dashboard/workbench/components/WorkbenchMain/index.vue @@ -77,7 +77,7 @@ const technology: Technology[] = [ description: '一套用于构建用户界面的渐进式框架', author: '尤雨溪 - Evan You', site: 'https://v3.cn.vuejs.org/', - icon: 'vscode-icons:file-type-vue' + icon: 'vscode-icons:file-type-vue', }, { id: 1, @@ -85,7 +85,7 @@ const technology: Technology[] = [ description: 'JavaScript类型的超集,它可以编译成纯JavaScript', author: '微软 - Microsoft', site: 'https://www.typescriptlang.org/', - icon: 'vscode-icons:file-type-typescript-official' + icon: 'vscode-icons:file-type-typescript-official', }, { id: 2, @@ -93,7 +93,7 @@ const technology: Technology[] = [ description: '下一代前端开发与构建工具', author: '尤雨溪 - Evan You', site: 'https://vitejs.cn/', - icon: 'vscode-icons:file-type-vite' + icon: 'vscode-icons:file-type-vite', }, { id: 3, @@ -102,7 +102,7 @@ const technology: Technology[] = [ author: '图森未来 - TuSimple', site: 'https://www.naiveui.com/zh-CN/os-theme', icon: 'mdi:alpha-n-box-outline', - iconColor: '#5fbc22' + iconColor: '#5fbc22', }, { id: 4, @@ -111,7 +111,7 @@ const technology: Technology[] = [ author: 'Windicss', site: 'https://windicss.org/', icon: 'file-icons:windi', - iconColor: '#48b0f1' + iconColor: '#48b0f1', }, { id: 5, @@ -120,8 +120,8 @@ const technology: Technology[] = [ author: 'Posva', site: 'https://pinia.esm.dev/', icon: 'mdi:fruit-pineapple', - iconColor: '#fecf48' - } + iconColor: '#fecf48', + }, ]; const activity: Activity[] = [ @@ -129,7 +129,7 @@ const activity: Activity[] = [ { id: 3, content: 'Soybean 正在忙于为soybean-admin写项目说明文档!', time: '2021-11-03 20:33:31' }, { id: 2, content: 'Soybean 准备为soybean-admin 1.0的发布做充分的准备工作!', time: '2021-10-31 22:43:12' }, { id: 1, content: '@yanbowe 向soybean-admin提交了一个bug,多标签栏不会自适应。', time: '2021-10-27 10:24:54' }, - { id: 0, content: 'Soybean 在2021年5月28日创建了开源项目soybean-admin!', time: '2021-05-28 22:22:22' } + { id: 0, content: 'Soybean 在2021年5月28日创建了开源项目soybean-admin!', time: '2021-05-28 22:22:22' }, ]; const shortcuts: Shortcuts[] = [ @@ -138,7 +138,7 @@ const shortcuts: Shortcuts[] = [ { id: 2, label: '权限管理', icon: 'mdi:family-tree', iconColor: '#f56c6c' }, { id: 3, label: '组件', icon: 'fluent:app-store-24-filled', iconColor: '#19a2f1' }, { id: 4, label: '表格', icon: 'mdi:table-large', iconColor: '#fab251' }, - { id: 5, label: '图表', icon: 'mdi:chart-areaspline', iconColor: '#8aca6b' } + { id: 5, label: '图表', icon: 'mdi:chart-areaspline', iconColor: '#8aca6b' }, ]; diff --git a/src/views/index.ts b/src/views/index.ts index 8657f049..41027261 100644 --- a/src/views/index.ts +++ b/src/views/index.ts @@ -13,11 +13,11 @@ const ROUTE_KEY_SPLIT_MARK = '_'; const SYSTEM_VIEW = 'system-view_'; /** 过滤掉组件文件 */ -const viewKeys = Object.keys(importViews).filter(key => !key.includes(COMPONENTS_KEY)); +const viewKeys = Object.keys(importViews).filter((key) => !key.includes(COMPONENTS_KEY)); function getViewComponent() { const components: ViewComponent = {}; - viewKeys.forEach(key => { + viewKeys.forEach((key) => { const routeKey = key .replace(PREFIX, '') .replace(SUFFIX, '') diff --git a/src/views/plugin/editor/markdown/index.vue b/src/views/plugin/editor/markdown/index.vue index f90dbd3c..c863c7f5 100644 --- a/src/views/plugin/editor/markdown/index.vue +++ b/src/views/plugin/editor/markdown/index.vue @@ -22,17 +22,18 @@ const vditor = ref(); const domRef = ref(); function renderVditor() { - vditor.value = new Vditor(domRef.value!, { + if (!domRef.value) return; + vditor.value = new Vditor(domRef.value, { minHeight: 400, theme: theme.darkMode ? 'dark' : 'classic', icon: 'material', - cache: { enable: false } + cache: { enable: false }, }); } const stopHandle = watch( () => theme.darkMode, - newValue => { + (newValue) => { const themeMode = newValue ? 'dark' : 'classic'; vditor.value?.setTheme(themeMode); } diff --git a/src/views/plugin/editor/quill/index.vue b/src/views/plugin/editor/quill/index.vue index 107cd316..da03b8e0 100644 --- a/src/views/plugin/editor/quill/index.vue +++ b/src/views/plugin/editor/quill/index.vue @@ -24,7 +24,9 @@ function renderWangEditor() { } function setEditorConfig() { - editor.value!.config.zIndex = 10; + if (editor.value?.config?.zIndex) { + editor.value.config.zIndex = 10; + } } onMounted(() => { diff --git a/src/views/plugin/icon/icons.ts b/src/views/plugin/icon/icons.ts index cce161fc..8fe41b80 100644 --- a/src/views/plugin/icon/icons.ts +++ b/src/views/plugin/icon/icons.ts @@ -28,7 +28,7 @@ export const icons = [ 'ic:baseline-filter-7', 'ic:baseline-filter-8', 'ic:baseline-filter-9', - 'ic:baseline-filter-9-plus' + 'ic:baseline-filter-9-plus', ]; // const assetsSvg = import.meta.glob('../../../assets/svg/*.svg'); diff --git a/src/views/plugin/map/components/BaiduMap.vue b/src/views/plugin/map/components/BaiduMap.vue index e9276a02..879fcc38 100644 --- a/src/views/plugin/map/components/BaiduMap.vue +++ b/src/views/plugin/map/components/BaiduMap.vue @@ -12,8 +12,9 @@ const { load } = useScriptTag(BAIDU_MAP_SDK_URL); const domRef = ref(); async function renderBaiduMap() { + if (!domRef.value) return; await load(true); - const map = new BMap.Map(domRef.value!); + const map = new BMap.Map(domRef.value); const point = new BMap.Point(114.05834626586915, 22.546789983033168); map.centerAndZoom(point, 15); map.enableScrollWheelZoom(); diff --git a/src/views/plugin/map/components/GaodeMap.vue b/src/views/plugin/map/components/GaodeMap.vue index 691ba76d..b211e471 100644 --- a/src/views/plugin/map/components/GaodeMap.vue +++ b/src/views/plugin/map/components/GaodeMap.vue @@ -12,14 +12,14 @@ const { load } = useScriptTag(GAODE_MAP_SDK_URL); const domRef = ref(); async function renderBaiduMap() { + if (!domRef.value) return; await load(true); - const map = new AMap.Map(domRef.value!, { + // eslint-disable-next-line @typescript-eslint/no-unused-vars + const map = new AMap.Map(domRef.value, { zoom: 11, center: [114.05834626586915, 22.546789983033168], - viewMode: '3D' + viewMode: '3D', }); - - return map; } onMounted(() => { diff --git a/src/views/plugin/map/components/TencentMap.vue b/src/views/plugin/map/components/TencentMap.vue index d5d1cc09..07970446 100644 --- a/src/views/plugin/map/components/TencentMap.vue +++ b/src/views/plugin/map/components/TencentMap.vue @@ -12,14 +12,14 @@ const { load } = useScriptTag(TENCENT_MAP_SDK_URL); const domRef = ref(null); async function renderBaiduMap() { + if (!domRef.value) return; await load(true); - const map = new TMap.Map(domRef.value!, { + // eslint-disable-next-line @typescript-eslint/no-unused-vars + const map = new TMap.Map(domRef.value, { center: new TMap.LatLng(39.98412, 116.307484), zoom: 11, - viewMode: '3D' + viewMode: '3D', }); - - return map; } onMounted(() => { diff --git a/src/views/plugin/map/index.vue b/src/views/plugin/map/index.vue index 0e0a8cc0..445dde5d 100644 --- a/src/views/plugin/map/index.vue +++ b/src/views/plugin/map/index.vue @@ -22,7 +22,7 @@ interface Map { const maps: Map[] = [ { id: 'gaode', label: '高德地图', component: GaodeMap }, - { id: 'tencent', label: '腾讯地图', component: TencentMap } + { id: 'tencent', label: '腾讯地图', component: TencentMap }, ]; diff --git a/src/views/plugin/print/index.vue b/src/views/plugin/print/index.vue index 864f8d1d..509bcf37 100644 --- a/src/views/plugin/print/index.vue +++ b/src/views/plugin/print/index.vue @@ -18,21 +18,21 @@ function printTable() { printJS({ printable: [ { name: 'soybean', wechat: 'honghuangdc', remark: '欢迎来技术交流' }, - { name: 'soybean', wechat: 'honghuangdc', remark: '欢迎来技术交流' } + { name: 'soybean', wechat: 'honghuangdc', remark: '欢迎来技术交流' }, ], properties: ['name', 'wechat', 'remark'], - type: 'json' + type: 'json', }); } function printImage() { printJS({ printable: [ 'https://raw.githubusercontent.com/honghuangdc/project-assets/main/img/qq_qrcode.JPG', - 'https://raw.githubusercontent.com/honghuangdc/project-assets/main/img/qq_qrcode.JPG' + 'https://raw.githubusercontent.com/honghuangdc/project-assets/main/img/qq_qrcode.JPG', ], type: 'image', header: 'Multiple Images', - imageStyle: 'width:100%;' + imageStyle: 'width:100%;', }); } diff --git a/src/views/plugin/swiper/index.vue b/src/views/plugin/swiper/index.vue index e430af1c..28a25134 100644 --- a/src/views/plugin/swiper/index.vue +++ b/src/views/plugin/swiper/index.vue @@ -53,22 +53,22 @@ const swiperExample: SwiperExample[] = [ id: 1, label: 'Navigation', options: { - navigation: true - } + navigation: true, + }, }, { id: 2, label: 'Pagination', options: { - pagination: true - } + pagination: true, + }, }, { id: 3, label: 'Pagination dynamic', options: { - pagination: { dynamicBullets: true } - } + pagination: { dynamicBullets: true }, + }, }, { id: 4, @@ -76,9 +76,9 @@ const swiperExample: SwiperExample[] = [ options: { navigation: true, pagination: { - type: 'progressbar' - } - } + type: 'progressbar', + }, + }, }, { id: 5, @@ -86,20 +86,20 @@ const swiperExample: SwiperExample[] = [ options: { navigation: true, pagination: { - type: 'fraction' - } - } + type: 'fraction', + }, + }, }, { id: 6, label: 'Slides per view', options: { pagination: { - clickable: true + clickable: true, }, slidesPerView: 3, - spaceBetween: 30 - } + spaceBetween: 30, + }, }, { id: 7, @@ -107,11 +107,11 @@ const swiperExample: SwiperExample[] = [ options: { navigation: true, pagination: { - clickable: true + clickable: true, }, - loop: true - } - } + loop: true, + }, + }, ]; diff --git a/src/views/plugin/video/index.vue b/src/views/plugin/video/index.vue index d40cce4b..1ca05b14 100644 --- a/src/views/plugin/video/index.vue +++ b/src/views/plugin/video/index.vue @@ -14,11 +14,12 @@ const domRef = ref(); const player = ref(); function renderXgPlayer() { + if (!domRef.value) return; const url = 'https://lf9-cdn-tos.bytecdntp.com/cdn/expire-1-M/byted-player-videos/1.0.0/xgplayer-demo.mp4'; player.value = new Player({ - el: domRef.value!, + el: domRef.value, url, - playbackRate: [0.5, 0.75, 1, 1.5, 2] + playbackRate: [0.5, 0.75, 1, 1.5, 2], }); } function destroyXgPlayer() { diff --git a/src/views/system-view/login/components/BindWechat/index.vue b/src/views/system-view/login/components/BindWechat/index.vue index 68f3ee9a..0df5c221 100644 --- a/src/views/system-view/login/components/BindWechat/index.vue +++ b/src/views/system-view/login/components/BindWechat/index.vue @@ -33,11 +33,11 @@ const formRef = ref<(HTMLElement & FormInst) | null>(null); const model = reactive({ phone: '', code: '', - imgCode: '' + imgCode: '', }); const rules = { phone: formRules.phone, - code: formRules.code + code: formRules.code, }; function handleSmsCode() { @@ -48,7 +48,7 @@ function handleSubmit(e: MouseEvent) { if (!formRef.value) return; e.preventDefault(); - formRef.value.validate(errors => { + formRef.value.validate((errors) => { if (!errors) { window.$message?.success('验证成功'); } else { diff --git a/src/views/system-view/login/components/CodeLogin/index.vue b/src/views/system-view/login/components/CodeLogin/index.vue index 2bd05d9b..3b485028 100644 --- a/src/views/system-view/login/components/CodeLogin/index.vue +++ b/src/views/system-view/login/components/CodeLogin/index.vue @@ -52,13 +52,13 @@ const formRef = ref<(HTMLElement & FormInst) | null>(null); const model = reactive({ phone: '', code: '', - imgCode: '' + imgCode: '', }); const imgCode = ref(''); const rules = { phone: formRules.phone, code: formRules.code, - imgCode: getImgCodeRule(imgCode) + imgCode: getImgCodeRule(imgCode), }; function handleSmsCode() { @@ -69,7 +69,7 @@ function handleSubmit(e: MouseEvent) { if (!formRef.value) return; e.preventDefault(); - formRef.value.validate(errors => { + formRef.value.validate((errors) => { if (!errors) { const { phone, code } = model; login(phone, code, 'sms'); diff --git a/src/views/system-view/login/components/LoginBg/components/CornerBottom.vue b/src/views/system-view/login/components/LoginBg/components/CornerBottom.vue index b62deb4c..098d21d5 100644 --- a/src/views/system-view/login/components/LoginBg/components/CornerBottom.vue +++ b/src/views/system-view/login/components/LoginBg/components/CornerBottom.vue @@ -34,7 +34,7 @@ interface Props { withDefaults(defineProps(), { startColor: '#28aff0', - endColor: '#120fc4' + endColor: '#120fc4', }); diff --git a/src/views/system-view/login/components/LoginBg/components/CornerTop.vue b/src/views/system-view/login/components/LoginBg/components/CornerTop.vue index 6b1d6e20..da3fb593 100644 --- a/src/views/system-view/login/components/LoginBg/components/CornerTop.vue +++ b/src/views/system-view/login/components/LoginBg/components/CornerTop.vue @@ -28,7 +28,7 @@ interface Props { withDefaults(defineProps(), { startColor: '#28aff0', - endColor: '#120fc4' + endColor: '#120fc4', }); diff --git a/src/views/system-view/login/components/PwdLogin/index.vue b/src/views/system-view/login/components/PwdLogin/index.vue index 100be64e..776afa0c 100644 --- a/src/views/system-view/login/components/PwdLogin/index.vue +++ b/src/views/system-view/login/components/PwdLogin/index.vue @@ -51,11 +51,11 @@ const { toLoginModule } = useRouterPush(); const formRef = ref<(HTMLElement & FormInst) | null>(null); const model = reactive({ phone: '15170283876', - pwd: 'abc123456' + pwd: 'abc123456', }); const rules: FormRules = { phone: formRules.phone, - pwd: formRules.pwd + pwd: formRules.pwd, }; const rememberMe = ref(false); @@ -63,7 +63,7 @@ function handleSubmit(e: MouseEvent) { if (!formRef.value) return; e.preventDefault(); - formRef.value.validate(errors => { + formRef.value.validate((errors) => { if (!errors) { const { phone, pwd } = model; login(phone, pwd, 'pwd'); diff --git a/src/views/system-view/login/components/Register/index.vue b/src/views/system-view/login/components/Register/index.vue index d573e7c6..d9c406c1 100644 --- a/src/views/system-view/login/components/Register/index.vue +++ b/src/views/system-view/login/components/Register/index.vue @@ -42,13 +42,13 @@ const model = reactive({ phone: '', code: '', pwd: '', - confirmPwd: '' + confirmPwd: '', }); const rules: FormRules = { phone: formRules.phone, code: formRules.code, pwd: formRules.pwd, - confirmPwd: getConfirmPwdRule(toRefs(model).pwd) + confirmPwd: getConfirmPwdRule(toRefs(model).pwd), }; const agreement = ref(false); @@ -61,7 +61,7 @@ function handleSubmit(e: MouseEvent) { if (!formRef.value) return; e.preventDefault(); - formRef.value.validate(errors => { + formRef.value.validate((errors) => { if (!errors) { if (!agreement.value) return; window.$message?.success('验证成功'); diff --git a/src/views/system-view/login/components/ResetPwd/index.vue b/src/views/system-view/login/components/ResetPwd/index.vue index 1f235f5c..6569c467 100644 --- a/src/views/system-view/login/components/ResetPwd/index.vue +++ b/src/views/system-view/login/components/ResetPwd/index.vue @@ -40,13 +40,13 @@ const model = reactive({ phone: '', code: '', pwd: '', - confirmPwd: '' + confirmPwd: '', }); const rules: FormRules = { phone: formRules.phone, code: formRules.code, pwd: formRules.pwd, - confirmPwd: getConfirmPwdRule(toRefs(model).pwd) + confirmPwd: getConfirmPwdRule(toRefs(model).pwd), }; function handleSmsCode() { @@ -57,7 +57,7 @@ function handleSubmit(e: MouseEvent) { if (!formRef.value) return; e.preventDefault(); - formRef.value.validate(errors => { + formRef.value.validate((errors) => { if (!errors) { window.$message?.success('验证成功'); } else { diff --git a/src/views/system-view/login/index.vue b/src/views/system-view/login/index.vue index 6e41877c..99ad7ebf 100644 --- a/src/views/system-view/login/index.vue +++ b/src/views/system-view/login/index.vue @@ -59,12 +59,12 @@ const modules: LoginModule[] = [ { key: 'code-login', label: EnumLoginModule['code-login'], component: CodeLogin }, { key: 'register', label: EnumLoginModule.register, component: Register }, { key: 'reset-pwd', label: EnumLoginModule['reset-pwd'], component: ResetPwd }, - { key: 'bind-wechat', label: EnumLoginModule['bind-wechat'], component: BindWechat } + { key: 'bind-wechat', label: EnumLoginModule['bind-wechat'], component: BindWechat }, ]; const activeModule = computed(() => { const active: LoginModule = { ...modules[0] }; - const findItem = modules.find(item => item.key === props.module); + const findItem = modules.find((item) => item.key === props.module); if (findItem) { Object.assign(active, findItem); } diff --git a/tsconfig.json b/tsconfig.json index 8fb180fd..2c7a6131 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -4,7 +4,6 @@ "src/typings/**/*.d.ts", "src/**/*", "src/**/*.vue", - "vite.config.*", "mock/**/*.ts", "build/**/*.ts", ".env-config.ts", @@ -14,11 +13,16 @@ "node_modules" ], "compilerOptions": { - "baseUrl": "./", + "baseUrl": ".", "paths": { "@/*": ["./src/*"], "~/*": ["./*"] }, "types": ["naive-ui/volar"] - } + }, + "references": [ + { + "path": "./tsconfig.vite-config.json" + } + ] } diff --git a/tsconfig.vite-config.json b/tsconfig.vite-config.json index d20d8726..93fe5846 100644 --- a/tsconfig.vite-config.json +++ b/tsconfig.vite-config.json @@ -3,6 +3,6 @@ "include": ["vite.config.*"], "compilerOptions": { "composite": true, - "types": ["node", "vitest"] + "types": ["node"] } } diff --git a/vite.config.ts b/vite.config.ts index babe81e4..c9dda609 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -2,7 +2,7 @@ import { fileURLToPath } from 'url'; import { defineConfig, loadEnv } from 'vite'; import { setupVitePlugins, define } from './build'; -export default defineConfig(configEnv => { +export default defineConfig((configEnv) => { const viteEnv = loadEnv(configEnv.mode, `.env.${configEnv.mode}`) as ImportMetaEnv; const srcPath = fileURLToPath(new URL('./src', import.meta.url)); @@ -13,29 +13,29 @@ export default defineConfig(configEnv => { resolve: { alias: { '@': srcPath, - '~': rootPath - } + '~': rootPath, + }, }, define, plugins: setupVitePlugins(configEnv, srcPath, viteEnv), css: { preprocessorOptions: { scss: { - additionalData: `@use "./src/styles/scss/global.scss" as *;` - } - } + additionalData: `@use "./src/styles/scss/global.scss" as *;`, + }, + }, }, server: { fs: { - strict: false + strict: false, }, host: '0.0.0.0', port: 3200, - open: true + open: true, }, build: { brotliSize: false, - sourcemap: false - } + sourcemap: false, + }, }; }); diff --git a/windi.config.ts b/windi.config.ts index 6ff222a3..5f3b1190 100644 --- a/windi.config.ts +++ b/windi.config.ts @@ -3,7 +3,7 @@ import { defineConfig } from 'windicss/helpers'; export default defineConfig({ extract: { include: ['src/**/*.{vue,html,jsx,tsx}', 'public/**/*.{html}', './*.html'], - exclude: ['node_modules', '.git', './stats.html'] + exclude: ['node_modules', '.git', './stats.html'], }, darkMode: 'class', shortcuts: { @@ -40,7 +40,7 @@ export default defineConfig({ 'fixed-center': 'fixed left-0 top-0 flex-center wh-full', 'nowrap-hidden': 'whitespace-nowrap overflow-hidden', 'ellipsis-text': 'nowrap-hidden overflow-ellipsis', - 'transition-base': 'transition-all duration-300 ease-in-out' + 'transition-base': 'transition-all duration-300 ease-in-out', }, theme: { extend: { @@ -64,15 +64,15 @@ export default defineConfig({ error: 'var(--error-color)', 'error-hover': 'var(--error-color-hover)', 'error-pressed': 'var(--error-color-pressed)', - 'error-active': 'var(--error-color-active)' + 'error-active': 'var(--error-color-active)', }, backgroundColor: { dark: '#18181c', - 'dark-base': '#101014' + 'dark-base': '#101014', }, textColor: { 'black-base': '#333639', - 'white-base': 'rgba(255, 255, 255, 0.82)' + 'white-base': 'rgba(255, 255, 255, 0.82)', }, transitionProperty: [ 'width', @@ -82,10 +82,10 @@ export default defineConfig({ 'padding-left', 'border-color', 'right', - 'fill' - ] - } + 'fill', + ], + }, }, variants: {}, - plugins: [] + plugins: [], });