diff --git a/.eslintrc.js b/.eslintrc.js index 244dbbbf..5a7245ac 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -1,6 +1,4 @@ -// @ts-check -const { defineConfig } = require('eslint-define-config') -module.exports = defineConfig({ +module.exports = { root: true, env: { browser: true, @@ -8,6 +6,7 @@ module.exports = defineConfig({ es6: true }, parser: 'vue-eslint-parser', + plugins: ['vue'], parserOptions: { parser: '@typescript-eslint/parser', ecmaVersion: 2020, @@ -17,16 +16,9 @@ module.exports = defineConfig({ jsx: true } }, - extends: [ - 'plugin:vue/vue3-recommended', - 'plugin:@typescript-eslint/recommended', - 'prettier', - 'plugin:prettier/recommended', - './.eslintrc-auto-import.json' - ], + extends: ['plugin:vue/vue3-recommended', 'prettier', 'plugin:@typescript-eslint/recommended', 'plugin:prettier/recommended'], rules: { 'vue/script-setup-uses-vars': 'error', - 'vue/no-reserved-component-names': 'off', '@typescript-eslint/ban-ts-ignore': 'off', '@typescript-eslint/explicit-function-return-type': 'off', '@typescript-eslint/no-explicit-any': 'off', @@ -39,8 +31,20 @@ module.exports = defineConfig({ '@typescript-eslint/ban-types': 'off', '@typescript-eslint/no-non-null-assertion': 'off', '@typescript-eslint/explicit-module-boundary-types': 'off', - '@typescript-eslint/no-unused-vars': 'error', - 'no-unused-vars': 'error', + '@typescript-eslint/no-unused-vars': [ + 'error', + { + argsIgnorePattern: '^_', + varsIgnorePattern: '^_' + } + ], + 'no-unused-vars': [ + 'error', + { + argsIgnorePattern: '^_', + varsIgnorePattern: '^_' + } + ], 'space-before-function-paren': 'off', 'vue/attributes-order': 'off', @@ -66,4 +70,4 @@ module.exports = defineConfig({ ], 'vue/multi-word-component-names': 'off' } -}) +} diff --git a/.vscode/settings.json b/.vscode/settings.json index 5b3aa477..469e4017 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,36 +1,98 @@ { - "typescript.tsdk": "node_modules/typescript/lib", - "prettier.enable": true, - "editor.formatOnType": true, - "editor.formatOnSave": true, - "editor.formatOnPaste": true, - "editor.codeActionsOnSave": { - "source.fixAll.eslint": true + "typescript.tsdk": "./node_modules/typescript/lib", + "volar.tsPlugin": true, + "volar.tsPluginStatus": false, + "npm.packageManager": "pnpm", + "editor.tabSize": 2, + "prettier.printWidth": 100, // 超过最大值换行 + "editor.defaultFormatter": "esbenp.prettier-vscode", + "files.eol": "\n", + "search.exclude": { + "**/node_modules": true, + "**/*.log": true, + "**/*.log*": true, + "**/bower_components": true, + "**/dist": true, + "**/elehukouben": true, + "**/.git": true, + "**/.gitignore": true, + "**/.svn": true, + "**/.DS_Store": true, + "**/.idea": true, + "**/.vscode": false, + "**/yarn.lock": true, + "**/tmp": true, + "out": true, + "dist": true, + "node_modules": true, + "CHANGELOG.md": true, + "examples": true, + "res": true, + "screenshots": true, + "yarn-error.log": true, + "**/.yarn": true }, - "[vue]": { - "editor.defaultFormatter": "Vue.volar" + "files.exclude": { + "**/.cache": true, + "**/.editorconfig": true, + "**/.eslintcache": true, + "**/bower_components": true, + "**/.idea": true, + "**/tmp": true, + "**/.git": true, + "**/.svn": true, + "**/.hg": true, + "**/CVS": true, + "**/.DS_Store": true }, - "[javascript]": { + "files.watcherExclude": { + "**/.git/objects/**": true, + "**/.git/subtree-cache/**": true, + "**/.vscode/**": true, + "**/node_modules/**": true, + "**/tmp/**": true, + "**/bower_components/**": true, + "**/dist/**": true, + "**/yarn.lock": true + }, + "stylelint.enable": true, + "stylelint.validate": ["css", "less", "postcss", "scss", "vue", "sass"], + "path-intellisense.mappings": { + "@/": "${workspaceRoot}/src" + }, + "[javascriptreact]": { "editor.defaultFormatter": "esbenp.prettier-vscode" }, "[typescript]": { - "editor.defaultFormatter": "esbenp.prettier-vscode" + "editor.defaultFormatter": "rvest.vs-code-prettier-eslint" }, - "[json]": { - "editor.defaultFormatter": "esbenp.prettier-vscode" - }, - "[jsonc]": { - "editor.defaultFormatter": "esbenp.prettier-vscode" + "[typescriptreact]": { + "editor.defaultFormatter": "rvest.vs-code-prettier-eslint" }, "[html]": { "editor.defaultFormatter": "esbenp.prettier-vscode" }, "[css]": { + "editor.defaultFormatter": "rvest.vs-code-prettier-eslint" + }, + "[less]": { "editor.defaultFormatter": "esbenp.prettier-vscode" }, "[scss]": { "editor.defaultFormatter": "esbenp.prettier-vscode" }, + "[markdown]": { + "editor.defaultFormatter": "esbenp.prettier-vscode" + }, + "editor.codeActionsOnSave": { + "source.fixAll.eslint": true + }, + "[vue]": { + "editor.codeActionsOnSave": { + "source.fixAll.eslint": true, + "source.fixAll.stylelint": true + } + }, "i18n-ally.localesPaths": ["src/locales"], "i18n-ally.keystyle": "nested", "i18n-ally.sortKeys": true, @@ -39,16 +101,69 @@ "i18n-ally.sourceLanguage": "en", "i18n-ally.displayLanguage": "zh-CN", "i18n-ally.enabledFrameworks": ["vue", "react"], - "god.tsconfig": "./tsconfig.json", - "vue-i18n.i18nPaths": "src/locales", + "cSpell.words": [ + "vben", + "windicss", + "tailwind", + "browserslist", + "tailwindcss", + "esnext", + "antv", + "tinymce", + "qrcode", + "sider", + "pinia", + "sider", + "nprogress", + "INTLIFY", + "stylelint", + "esno", + "vitejs", + "sortablejs", + "codemirror", + "iconify", + "commitlint", + "vditor", + "echarts", + "cropperjs", + "logicflow", + "vueuse", + "zxcvbn", + "lintstagedrc", + "brotli", + "sider", + "pnpm", + "antd" + ], + "vetur.format.scriptInitialIndent": true, + "vetur.format.styleInitialIndent": true, + "vetur.validation.script": false, + "MicroPython.executeButton": [ + { + "text": "▶", + "tooltip": "运行", + "alignment": "left", + "command": "extension.executeFile", + "priority": 3.5 + } + ], + "MicroPython.syncButton": [ + { + "text": "$(sync)", + "tooltip": "同步", + "alignment": "left", + "command": "extension.execute", + "priority": 4 + } + ], + // 控制相关文件嵌套展示 "explorer.fileNesting.enabled": true, "explorer.fileNesting.expand": false, "explorer.fileNesting.patterns": { "*.ts": "$(capture).test.ts, $(capture).test.tsx", "*.tsx": "$(capture).test.ts, $(capture).test.tsx", "*.env": "$(capture).env.*", - "CHANGELOG.md": "CHANGELOG*", - "package.json": "pnpm-lock.yaml,pnpm-workspace.yaml,LICENSE,.gitattributes,.gitignore,.gitpod.yml,CNAME,README*,.npmrc,.browserslistrc,vite.config.*,windi.*,tailwind.*,tsconfig.*,postcss*", - ".eslintrc.js": ".eslintignore,.eslintrc-*,.prettierignore,.stylelintignore,.commitlintrc.js,.prettierrc.js,.stylelint*,stylelint*,prettier.*,.editorconfig" - } + "package.json": "pnpm-lock.yaml,yarn.lock,LICENSE,README*,CHANGELOG*,CNAME,.gitattributes,.gitignore,prettier.config.js,stylelint.config.js,commitlint.config.js,.stylelintignore,.prettierignore,.gitpod.yml,.eslintrc.js,.eslintignore" + }, + "terminal.integrated.scrollback": 10000 } diff --git a/README.md b/README.md index 4a0de6ae..dc69a06d 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ ## 🐶 新手必读 -* nodejs > 16.0.0 && pnpm > 7.30.0 +* nodejs > 16.0.0 && pnpm > 8.6.0 (强制使用pnpm) * 演示地址【Vue3 + element-plus】: * 演示地址【Vue3 + vben(ant-design-vue)】: * 演示地址【Vue2 + element-ui】: @@ -39,11 +39,11 @@ | 框架 | 说明 | 版本 | |----------------------------------------------------------------------|------------------|--------| | [Vue](https://staging-cn.vuejs.org/) | Vue 框架 | 3.3.4 | -| [Vite](https://cn.vitejs.dev//) | 开发与构建工具 | 4.3.8 | -| [Element Plus](https://element-plus.org/zh-CN/) | Element Plus | 2.3.4 | +| [Vite](https://cn.vitejs.dev//) | 开发与构建工具 | 4.3.9 | +| [Element Plus](https://element-plus.org/zh-CN/) | Element Plus | 2.3.7 | | [TypeScript](https://www.typescriptlang.org/docs/) | JavaScript 的超集 | 5.0.4 | -| [pinia](https://pinia.vuejs.org/) | Vue 存储库 替代 vuex5 | 2.1.3 | -| [vueuse](https://vueuse.org/) | 常用工具集 | 10.1.2 | +| [pinia](https://pinia.vuejs.org/) | Vue 存储库 替代 vuex5 | 2.1.4 | +| [vueuse](https://vueuse.org/) | 常用工具集 | 10.2.0 | | [vue-i18n](https://kazupon.github.io/vue-i18n/zh/introduction.html/) | 国际化 | 9.2.2 | | [vue-router](https://router.vuejs.org/) | Vue 路由 | 4.2.1 | | [windicss](https://cn.windicss.org/) | 下一代工具优先的 CSS 框架 | 3.5.6 | @@ -136,7 +136,7 @@ ps:核心功能已经实现,正在对接微信小程序中... | | 表单构建 | 拖动表单元素生成相应的 HTML 代码,支持导出 JSON、Vue 文件 | | 🚀 | 配置管理 | 对系统动态配置常用参数,支持 SpringBoot 加载 | | ⭐️ | 定时任务 | 在线(添加、修改、删除)任务调度包含执行结果日志 | -| 🚀 | 文件服务 | 支持将文件存储到 S3(MinIO、阿里云、腾讯云、七牛云)、本地、FTP、数据库等 | +| 🚀 | 文件服务 | 支持将文件存储到 S3(MinIO、阿里云、腾讯云、七牛云)、本地、FTP、数据库等 | | 🚀 | API 日志 | 包括 RESTful API 访问日志、异常日志两部分,方便排查 API 相关的问题 | | | MySQL 监控 | 监视当前系统数据库连接池状态,可进行分析SQL找出系统性能瓶颈 | | | Redis 监控 | 监控 Redis 数据库的使用情况,使用的 Redis Key 管理 | diff --git a/build/vite/index.ts b/build/vite/index.ts index 574a0d61..d5b6a4ac 100644 --- a/build/vite/index.ts +++ b/build/vite/index.ts @@ -13,7 +13,6 @@ import Components from 'unplugin-vue-components/vite' import { ElementPlusResolver } from 'unplugin-vue-components/resolvers' import viteCompression from 'vite-plugin-compression' import topLevelAwait from 'vite-plugin-top-level-await' -import vueSetupExtend from 'vite-plugin-vue-setup-extend-plus' import VueI18nPlugin from '@intlify/unplugin-vue-i18n/vite' import { createSvgIconsPlugin } from 'vite-plugin-svg-icons' @@ -31,7 +30,6 @@ export function createVitePlugins() { WindiCSS(), progress(), PurgeIcons(), - vueSetupExtend(), ElementPlus({}), AutoImport({ include: [ diff --git a/build/vite/optimize.ts b/build/vite/optimize.ts index 70fc3b8f..1ee3d280 100644 --- a/build/vite/optimize.ts +++ b/build/vite/optimize.ts @@ -12,7 +12,6 @@ const include = [ 'vue-router', 'vue-types', 'vue-i18n', - 'xe-utils', 'crypto-js', 'cropperjs', 'lodash-es', diff --git a/package.json b/package.json index eed2fdef..c37df50c 100644 --- a/package.json +++ b/package.json @@ -9,12 +9,12 @@ "dev": "vite --mode base", "front": "vite --mode front", "ts:check": "vue-tsc --noEmit", - "build:pro": "node --max_old_space_size=8000 ./node_modules/vite/bin/vite.js build --mode pro", - "build:dev": "node --max_old_space_size=8000 ./node_modules/vite/bin/vite.js build --mode dev", - "build:stage": "node --max_old_space_size=8000 ./node_modules/vite/bin/vite.js build --mode stage", - "build:test": "node --max_old_space_size=8000 ./node_modules/vite/bin/vite.js build --mode test", - "build:static": "node --max_old_space_size=8000 ./node_modules/vite/bin/vite.js build --mode static", - "build:front": "node --max_old_space_size=8000 ./node_modules/vite/bin/vite.js build --mode front", + "build:pro": "node --max_old_space_size=8192 ./node_modules/vite/bin/vite.js build --mode pro", + "build:dev": "node --max_old_space_size=8192 ./node_modules/vite/bin/vite.js build --mode dev", + "build:stage": "node --max_old_space_size=8192 ./node_modules/vite/bin/vite.js build --mode stage", + "build:test": "node --max_old_space_size=8192 ./node_modules/vite/bin/vite.js build --mode test", + "build:static": "node --max_old_space_size=8192 ./node_modules/vite/bin/vite.js build --mode static", + "build:front": "node --max_old_space_size=8192 ./node_modules/vite/bin/vite.js build --mode front", "serve:pro": "vite preview --mode pro", "serve:dev": "vite preview --mode dev", "serve:test": "vite preview --mode test", @@ -34,10 +34,10 @@ "@form-create/element-ui": "^3.1.17", "@iconify/iconify": "^3.1.0", "@videojs-player/vue": "^1.0.0", - "@vueuse/core": "^10.1.2", + "@vueuse/core": "^10.2.0", "@wangeditor/editor": "^5.1.23", "@wangeditor/editor-for-vue": "^5.1.10", - "@zxcvbn-ts/core": "^3.0.1", + "@zxcvbn-ts/core": "^3.0.2", "animate.css": "^4.1.1", "axios": "^1.4.0", "benz-amr-recorder": "^1.1.5", @@ -45,12 +45,12 @@ "camunda-bpmn-moddle": "^7.0.1", "cropperjs": "^1.5.13", "crypto-js": "^4.1.1", - "dayjs": "^1.11.7", + "dayjs": "^1.11.8", "diagram-js": "^11.6.0", "echarts": "^5.4.2", "echarts-wordcloud": "^2.1.0", - "element-plus": "2.3.4", - "fast-xml-parser": "^4.2.2", + "element-plus": "2.3.7", + "fast-xml-parser": "^4.2.4", "highlight.js": "^11.8.0", "intro.js": "^7.0.1", "jsencrypt": "^3.3.2", @@ -58,82 +58,77 @@ "min-dash": "^4.1.1", "mitt": "^3.0.0", "nprogress": "^0.2.0", - "pinia": "^2.1.3", + "pinia": "^2.1.4", "qrcode": "^1.5.3", "qs": "^6.11.2", "steady-xml": "^0.1.0", - "url": "^0.11.0", + "url": "^0.11.1", "video.js": "^8.3.0", "vue": "3.3.4", "vue-dompurify-html": "^4.1.4", "vue-i18n": "9.2.2", - "vue-router": "^4.2.1", - "vue-types": "^5.0.3", + "vue-router": "^4.2.2", + "vue-types": "^5.0.4", "vuedraggable": "^4.1.0", "web-storage-cache": "^1.1.1", - "xe-utils": "^3.5.7", "xml-js": "^1.6.11" }, "devDependencies": { - "@commitlint/cli": "^17.6.3", - "@commitlint/config-conventional": "^17.6.3", - "@iconify/json": "^2.2.67", - "@intlify/unplugin-vue-i18n": "^0.10.0", + "@commitlint/cli": "^17.6.5", + "@commitlint/config-conventional": "^17.6.5", + "@iconify/json": "^2.2.80", + "@intlify/unplugin-vue-i18n": "^0.11.0", "@purge-icons/generated": "^0.9.0", "@types/intro.js": "^5.1.1", "@types/lodash-es": "^4.17.7", - "@types/node": "^18.16.0", + "@types/node": "^20.3.1", "@types/nprogress": "^0.2.0", "@types/qrcode": "^1.5.0", "@types/qs": "^6.9.7", - "@typescript-eslint/eslint-plugin": "^5.59.6", - "@typescript-eslint/parser": "^5.59.6", - "@vitejs/plugin-legacy": "^4.0.3", + "@typescript-eslint/eslint-plugin": "^5.59.11", + "@typescript-eslint/parser": "^5.59.11", + "@vitejs/plugin-legacy": "^4.0.4", "@vitejs/plugin-vue": "^4.2.3", "@vitejs/plugin-vue-jsx": "^3.0.1", "autoprefixer": "^10.4.14", "bpmn-js": "^8.9.0", "bpmn-js-properties-panel": "^0.46.0", "consola": "^3.1.0", - "eslint": "^8.40.0", + "eslint": "^8.43.0", "eslint-config-prettier": "^8.8.0", - "eslint-define-config": "^1.20.0", + "eslint-define-config": "^1.21.0", "eslint-plugin-prettier": "^4.2.1", - "eslint-plugin-vue": "^9.13.0", + "eslint-plugin-vue": "^9.15.0", "lint-staged": "^13.2.2", - "postcss": "^8.4.23", + "postcss": "^8.4.24", "postcss-html": "^1.5.0", "postcss-scss": "^4.0.6", "prettier": "^2.8.8", "rimraf": "^5.0.1", - "rollup": "^3.22.0", - "sass": "^1.62.1", - "stylelint": "^15.6.2", - "stylelint-config-html": "^1.1.0", + "rollup": "^3.25.1", + "sass": "^1.63.5", + "stylelint": "^15.8.0", "stylelint-config-recommended": "^12.0.0", + "stylelint-config-recommended-vue": "^1.4.0", "stylelint-config-standard": "^33.0.0", "stylelint-order": "^6.0.3", - "terser": "^5.17.4", + "terser": "^5.18.1", "typescript": "5.0.4", - "unplugin-auto-import": "^0.16.0", + "unplugin-auto-import": "^0.16.4", "unplugin-element-plus": "^0.7.1", - "unplugin-vue-components": "^0.24.1", - "vite": "4.3.8", + "unplugin-vue-components": "^0.25.1", + "vite": "4.3.9", "vite-plugin-compression": "^0.5.1", "vite-plugin-ejs": "^1.6.4", "vite-plugin-eslint": "^1.8.1", "vite-plugin-progress": "^0.0.7", "vite-plugin-purge-icons": "^0.9.2", "vite-plugin-svg-icons": "^2.0.1", - "vite-plugin-top-level-await": "^1.3.0", - "vite-plugin-vue-setup-extend-plus": "^0.1.0", + "vite-plugin-top-level-await": "^1.3.1", "vite-plugin-windicss": "^1.9.0", - "vue-tsc": "^1.6.5", + "vue-tsc": "^1.8.1", "windicss": "^3.5.6" }, - "engines": { - "node": ">=16.0.0" - }, "license": "MIT", "repository": { "type": "git", @@ -142,5 +137,10 @@ "bugs": { "url": "https://gitee.com/yudaocode/yudao-ui-admin-vue3/issues" }, - "homepage": "https://gitee.com/yudaocode/yudao-ui-admin-vue3" + "homepage": "https://gitee.com/yudaocode/yudao-ui-admin-vue3", + "packageManager": "pnpm@8.6.0", + "engines": { + "node": ">= 16.0.0", + "pnpm": ">=8.6.0" + } } diff --git a/src/App.vue b/src/App.vue index f75478cd..7407d97a 100644 --- a/src/App.vue +++ b/src/App.vue @@ -1,10 +1,12 @@ - diff --git a/src/components/Echart/src/Echart.vue b/src/components/Echart/src/Echart.vue index 31f2eea0..fd3342dd 100644 --- a/src/components/Echart/src/Echart.vue +++ b/src/components/Echart/src/Echart.vue @@ -1,4 +1,4 @@ - diff --git a/src/views/Error/404.vue b/src/views/Error/404.vue index c55d3325..f6a08de2 100644 --- a/src/views/Error/404.vue +++ b/src/views/Error/404.vue @@ -1,6 +1,7 @@ - diff --git a/src/views/Error/500.vue b/src/views/Error/500.vue index 6cfe47b7..998487d2 100644 --- a/src/views/Error/500.vue +++ b/src/views/Error/500.vue @@ -1,6 +1,7 @@ - diff --git a/src/views/Home/Index.vue b/src/views/Home/Index.vue index 6c586f0b..dfa3b611 100644 --- a/src/views/Home/Index.vue +++ b/src/views/Home/Index.vue @@ -160,7 +160,7 @@ - + diff --git a/src/views/infra/webSocket/index.vue b/src/views/infra/webSocket/index.vue index c1690db2..1c7f2f00 100644 --- a/src/views/infra/webSocket/index.vue +++ b/src/views/infra/webSocket/index.vue @@ -55,11 +55,13 @@ -