From e0bc713f06ad1872b453cf385478f2c459810f41 Mon Sep 17 00:00:00 2001 From: kailong321200875 <321200875@qq.com> Date: Sat, 1 Jun 2024 17:12:17 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E6=9B=B4=E6=96=B0=E4=BE=9D=E8=B5=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .eslintrc.js => .eslintrc.cjs | 0 .husky/{lintstagedrc.js => lintstagedrc.cjs} | 0 commitlint.config.js => commitlint.config.cjs | 0 package.json | 79 ++++++++++--------- plop/component/{prompt.js => prompt.cjs} | 0 plop/view/{prompt.js => prompt.cjs} | 0 plopfile.js => plopfile.cjs | 4 +- postcss.config.js => postcss.config.cjs | 0 prettier.config.js => prettier.config.cjs | 0 src/store/modules/permission.ts | 1 - src/views/Function/Request.vue | 1 - stylelint.config.js => stylelint.config.cjs | 0 12 files changed, 42 insertions(+), 43 deletions(-) rename .eslintrc.js => .eslintrc.cjs (100%) rename .husky/{lintstagedrc.js => lintstagedrc.cjs} (100%) rename commitlint.config.js => commitlint.config.cjs (100%) rename plop/component/{prompt.js => prompt.cjs} (100%) rename plop/view/{prompt.js => prompt.cjs} (100%) rename plopfile.js => plopfile.cjs (52%) rename postcss.config.js => postcss.config.cjs (100%) rename prettier.config.js => prettier.config.cjs (100%) rename stylelint.config.js => stylelint.config.cjs (100%) diff --git a/.eslintrc.js b/.eslintrc.cjs similarity index 100% rename from .eslintrc.js rename to .eslintrc.cjs diff --git a/.husky/lintstagedrc.js b/.husky/lintstagedrc.cjs similarity index 100% rename from .husky/lintstagedrc.js rename to .husky/lintstagedrc.cjs diff --git a/commitlint.config.js b/commitlint.config.cjs similarity index 100% rename from commitlint.config.js rename to commitlint.config.cjs diff --git a/package.json b/package.json index 689ee9f..79ac3bd 100644 --- a/package.json +++ b/package.json @@ -4,6 +4,7 @@ "description": "一套基于vue3、element-plus、typesScript、vite4的后台集成方案。", "author": "Archer <502431556@qq.com>", "private": false, + "type": "module", "scripts": { "i": "pnpm install", "dev": "pnpm vite --mode base", @@ -21,63 +22,63 @@ "lint:eslint": "eslint --fix --ext .js,.ts,.vue ./src", "lint:format": "prettier --write --loglevel warn \"src/**/*.{js,ts,json,tsx,css,less,vue,html,md}\"", "lint:style": "stylelint --fix \"**/*.{vue,less,postcss,css,scss}\" --cache --cache-location node_modules/.cache/stylelint/", - "lint:lint-staged": "lint-staged -c ./.husky/lintstagedrc.js", + "lint:lint-staged": "lint-staged -c ./.husky/lintstagedrc.cjs", "prepare": "husky install", "p": "plop", "icon": "esno ./scripts/icon.ts" }, "dependencies": { "@iconify/iconify": "^3.1.1", - "@iconify/vue": "^4.1.1", - "@vueuse/core": "^10.9.0", + "@iconify/vue": "^4.1.2", + "@vueuse/core": "^10.10.0", "@wangeditor/editor": "^5.1.23", "@wangeditor/editor-for-vue": "^5.1.10", "@zxcvbn-ts/core": "^3.0.4", "animate.css": "^4.1.1", - "axios": "^1.6.8", - "cropperjs": "^1.6.1", - "dayjs": "^1.11.10", + "axios": "^1.7.2", + "cropperjs": "^1.6.2", + "dayjs": "^1.11.11", "driver.js": "^1.3.1", "echarts": "^5.5.0", "echarts-wordcloud": "^2.1.0", - "element-plus": "2.6.1", + "element-plus": "2.7.4", "lodash-es": "^4.17.21", "mitt": "^3.0.1", "nprogress": "^0.2.0", "pinia": "^2.1.7", "pinia-plugin-persistedstate": "^3.2.1", "qrcode": "^1.5.3", - "qs": "^6.12.0", + "qs": "^6.12.1", "url": "^0.11.3", - "vue": "3.4.21", - "vue-draggable-plus": "^0.3.5", - "vue-i18n": "9.10.2", + "vue": "3.4.27", + "vue-draggable-plus": "^0.5.0", + "vue-i18n": "9.13.1", "vue-json-pretty": "^2.4.0", - "vue-router": "^4.3.0", - "vue-types": "^5.1.1", - "xgplayer": "^3.0.14", - "monaco-editor": "^0.48.0" + "vue-router": "^4.3.2", + "vue-types": "^5.1.2", + "xgplayer": "^3.0.18", + "monaco-editor": "^0.49.0" }, "devDependencies": { - "@commitlint/cli": "^19.2.1", - "@commitlint/config-conventional": "^19.1.0", - "@iconify/json": "^2.2.194", - "@intlify/unplugin-vue-i18n": "^3.0.1", + "@commitlint/cli": "^19.3.0", + "@commitlint/config-conventional": "^19.2.2", + "@iconify/json": "^2.2.215", + "@intlify/unplugin-vue-i18n": "^4.0.0", "@types/fs-extra": "^11.0.4", "@types/inquirer": "^9.0.7", "@types/lodash-es": "^4.17.12", "@types/mockjs": "^1.0.10", - "@types/node": "^20.11.30", + "@types/node": "^20.13.0", "@types/nprogress": "^0.2.3", "@types/qrcode": "^1.5.5", - "@types/qs": "^6.9.14", + "@types/qs": "^6.9.15", "@types/sortablejs": "^1.15.8", - "@typescript-eslint/eslint-plugin": "^7.3.1", - "@typescript-eslint/parser": "^7.3.1", - "@unocss/transformer-variant-group": "^0.58.6", - "@vitejs/plugin-legacy": "^5.3.2", - "@vitejs/plugin-vue": "^5.0.4", - "@vitejs/plugin-vue-jsx": "^3.1.0", + "@typescript-eslint/eslint-plugin": "^7.11.0", + "@typescript-eslint/parser": "^7.11.0", + "@unocss/transformer-variant-group": "^0.60.4", + "@vitejs/plugin-legacy": "^5.4.1", + "@vitejs/plugin-vue": "^5.0.5", + "@vitejs/plugin-vue-jsx": "^4.0.0", "autoprefixer": "^10.4.19", "chalk": "^5.3.0", "consola": "^3.2.3", @@ -85,31 +86,31 @@ "eslint-config-prettier": "^9.1.0", "eslint-define-config": "^2.1.0", "eslint-plugin-prettier": "^5.1.3", - "eslint-plugin-vue": "^9.23.0", + "eslint-plugin-vue": "^9.26.0", "esno": "^4.7.0", "fs-extra": "^11.2.0", "husky": "^9.0.11", - "inquirer": "^9.2.16", + "inquirer": "^9.2.23", "less": "^4.2.0", - "lint-staged": "^15.2.2", + "lint-staged": "^15.2.5", "mockjs": "^1.1.0", "plop": "^4.0.1", "postcss": "^8.4.38", - "postcss-html": "^1.6.0", + "postcss-html": "^1.7.0", "postcss-less": "^6.0.0", "prettier": "^3.2.5", - "rimraf": "^5.0.5", - "rollup": "^4.13.0", + "rimraf": "^5.0.7", + "rollup": "^4.18.0", "rollup-plugin-visualizer": "^5.12.0", - "stylelint": "^16.2.1", + "stylelint": "^16.6.1", "stylelint-config-html": "^1.1.0", "stylelint-config-recommended": "^14.0.0", "stylelint-config-standard": "^36.0.0", "stylelint-order": "^6.0.4", - "terser": "^5.29.2", - "typescript": "5.4.3", - "unocss": "^0.58.6", - "vite": "5.2.2", + "terser": "^5.31.0", + "typescript": "5.4.5", + "unocss": "^0.60.4", + "vite": "5.2.12", "vite-plugin-ejs": "^1.7.0", "vite-plugin-eslint": "^1.8.1", "vite-plugin-mock": "2.9.6", @@ -118,7 +119,7 @@ "vite-plugin-style-import": "2.0.0", "vite-plugin-svg-icons": "^2.0.1", "vite-plugin-url-copy": "^1.1.4", - "vue-tsc": "^2.0.7" + "vue-tsc": "^2.0.19" }, "packageManager": "pnpm@8.1.0", "engines": { diff --git a/plop/component/prompt.js b/plop/component/prompt.cjs similarity index 100% rename from plop/component/prompt.js rename to plop/component/prompt.cjs diff --git a/plop/view/prompt.js b/plop/view/prompt.cjs similarity index 100% rename from plop/view/prompt.js rename to plop/view/prompt.cjs diff --git a/plopfile.js b/plopfile.cjs similarity index 52% rename from plopfile.js rename to plopfile.cjs index 72e6af2..ad90fa1 100644 --- a/plopfile.js +++ b/plopfile.cjs @@ -1,5 +1,5 @@ -const viewGenerator = require('./plop/view/prompt.js') -const componentGenerator = require('./plop/component/prompt.js') +const viewGenerator = require('./plop/view/prompt.cjs') +const componentGenerator = require('./plop/component/prompt.cjs') module.exports = function (plop) { plop.setGenerator('view', viewGenerator) diff --git a/postcss.config.js b/postcss.config.cjs similarity index 100% rename from postcss.config.js rename to postcss.config.cjs diff --git a/prettier.config.js b/prettier.config.cjs similarity index 100% rename from prettier.config.js rename to prettier.config.cjs diff --git a/src/store/modules/permission.ts b/src/store/modules/permission.ts index f2bcc5b..c997306 100644 --- a/src/store/modules/permission.ts +++ b/src/store/modules/permission.ts @@ -46,7 +46,6 @@ export const usePermissionStore = defineStore('permission', { if (type === 'server') { // 模拟后端过滤菜单 routerMap = generateRoutesByServer(routers as AppCustomRouteRecordRaw[]) - console.log(routerMap) } else if (type === 'frontEnd') { // 模拟前端过滤菜单 routerMap = generateRoutesByFrontEnd(cloneDeep(asyncRouterMap), routers as string[]) diff --git a/src/views/Function/Request.vue b/src/views/Function/Request.vue index 370acee..b37e67b 100644 --- a/src/views/Function/Request.vue +++ b/src/views/Function/Request.vue @@ -171,4 +171,3 @@ const tokenExpired = () => { token过期 -@/axios diff --git a/stylelint.config.js b/stylelint.config.cjs similarity index 100% rename from stylelint.config.js rename to stylelint.config.cjs