فهرست منبع

chore: 升级`vite`至`v5` 版本,规定`node`版本`>=18.0.0`,`pnpm`版本`>=8.6.10` (#738)

xiaoming 1 سال پیش
والد
کامیت
10e68d681f
18فایلهای تغییر یافته به همراه614 افزوده شده و 471 حذف شده
  1. 5 5
      .eslintignore
  2. 6 3
      .eslintrc.cjs
  3. 1 0
      .gitignore
  4. 1 1
      .lintstagedrc
  5. 1 0
      .nvmrc
  6. 4 1
      .prettierrc.js
  7. 2 2
      Dockerfile
  8. 3 3
      README.en-US.md
  9. 3 3
      README.md
  10. 0 0
      commitlint.config.cjs
  11. 1 1
      index.html
  12. 60 54
      package.json
  13. 407 288
      pnpm-lock.yaml
  14. 0 0
      postcss.config.cjs
  15. 4 1
      stylelint.config.cjs
  16. 4 3
      tailwind.config.ts
  17. 107 103
      types/global-components.d.ts
  18. 5 3
      vite.config.ts

+ 5 - 5
.eslintignore

@@ -3,11 +3,11 @@ dist
 *.d.ts
 /src/assets
 package.json
-.eslintrc.js
+.eslintrc.cjs
 .prettierrc.js
-commitlint.config.js
-postcss.config.js
-tailwind.config.js
-stylelint.config.js
+commitlint.config.cjs
+postcss.config.cjs
+tailwind.config.ts
+stylelint.config.cjs
 src/components/ReSplitPane/iconfont
 src/components/ReFlowChart/src/assets/iconfont

+ 6 - 3
.eslintrc.js → .eslintrc.cjs

@@ -1,4 +1,7 @@
-module.exports = {
+// @ts-check
+const { defineConfig } = require("eslint-define-config");
+
+module.exports = defineConfig({
   root: true,
   env: {
     node: true
@@ -42,7 +45,7 @@ module.exports = {
   parser: "vue-eslint-parser",
   parserOptions: {
     parser: "@typescript-eslint/parser",
-    ecmaVersion: 2020,
+    ecmaVersion: "latest",
     sourceType: "module",
     jsxPragma: "React",
     ecmaFeatures: {
@@ -117,4 +120,4 @@ module.exports = {
       }
     ]
   }
-}
+});

+ 1 - 0
.gitignore

@@ -5,6 +5,7 @@ dist-ssr
 *.local
 .eslintcache
 report.html
+vite.config.*.timestamp*
 
 yarn.lock
 npm-debug.log*

+ 1 - 1
.lintstagedrc

@@ -3,7 +3,7 @@
     "prettier --cache --ignore-unknown  --write",
     "eslint --cache --fix"
   ],
-  "{!(package)*.json,*.code-snippets,.!(browserslist)*rc}": [
+  "{!(package)*.json,*.code-snippets,.!({browserslist,nvm})*rc}": [
     "prettier --cache --write--parser json"
   ],
   "package.json": ["prettier --cache --write"],

+ 1 - 0
.nvmrc

@@ -0,0 +1 @@
+v20.9.0

+ 4 - 1
.prettierrc.js

@@ -1,4 +1,7 @@
-module.exports = {
+// @ts-check
+
+/** @type {import("prettier").Config} */
+export default {
   bracketSpacing: true,
   singleQuote: false,
   arrowParens: "avoid",

+ 2 - 2
Dockerfile

@@ -1,8 +1,8 @@
-FROM node:16-alpine as build-stage
+FROM node:18-alpine as build-stage
 
 WORKDIR /app
 RUN corepack enable
-RUN corepack prepare pnpm@7.32.1 --activate
+RUN corepack prepare pnpm@8.6.10 --activate
 
 RUN npm config set registry https://registry.npmmirror.com
 

+ 3 - 3
README.en-US.md

@@ -109,7 +109,7 @@ After operating the above two commands, open `http://localhost:8080` in the brow
 Of course, you can also operate the `docker` project through the [Docker Desktop](https://www.docker.com/products/docker-desktop/) visual interface, as shown below
 
 <p align="center">
-  <img alt="docker" width="100%" src="https://yiming_chang.gitee.io/pure-admin-doc/img/docker/1.jpg">
+  <img alt="docker" width="100%" src="https://xiaoxian521.github.io/hyperlink/img/docker-desktop.jpg">
 </p>
 
 ## Change Log
@@ -170,10 +170,10 @@ In principle, no fees and copyrights are charged, and it is commercially availab
 
 Many thanks to the kind individuals who leave a star. Your support is much appreciated :heart:
 
-[![Stargazers for vue-pure-admin](https://reporoster.com/stars/pure-admin/vue-pure-admin)](https://github.com/pure-admin/vue-pure-admin/stargazers)
+[![Stargazers repo roster for @pure-admin/vue-pure-admin](https://bytecrank.com/nastyox/reporoster/php/stargazersSVG.php?user=pure-admin&repo=vue-pure-admin)](https://github.com/pure-admin/vue-pure-admin/stargazers)
 
 ## `Fork`
 
 It's so cool that you study hard :heart:
 
-[![Forkers repo roster for vue-pure-admin](https://reporoster.com/forks/pure-admin/vue-pure-admin)](https://github.com/pure-admin/vue-pure-admin/network/members)
+[![Forkers repo roster for @pure-admin/vue-pure-admin](https://bytecrank.com/nastyox/reporoster/php/forkersSVG.php?user=pure-admin&repo=vue-pure-admin)](https://github.com/pure-admin/vue-pure-admin/network/members)

+ 3 - 3
README.md

@@ -109,7 +109,7 @@ docker run -dp 8080:80  --name pure-admin vue-pure-admin
 当然也可以通过 [Docker Desktop](https://www.docker.com/products/docker-desktop/) 可视化界面去操作 `docker` 项目,如下图
 
 <p align="center">
-  <img alt="docker" width="100%" src="https://yiming_chang.gitee.io/pure-admin-doc/img/docker/1.jpg">
+  <img alt="docker" width="100%" src="https://xiaoxian521.github.io/hyperlink/img/docker-desktop.jpg">
 </p>
 
 ## 更新日志
@@ -170,10 +170,10 @@ docker run -dp 8080:80  --name pure-admin vue-pure-admin
 
 非常感谢留下星星的好心人,感谢您的支持 :heart:
 
-[![Stargazers for vue-pure-admin](https://reporoster.com/stars/pure-admin/vue-pure-admin)](https://github.com/pure-admin/vue-pure-admin/stargazers)
+[![Stargazers repo roster for @pure-admin/vue-pure-admin](https://bytecrank.com/nastyox/reporoster/php/stargazersSVG.php?user=pure-admin&repo=vue-pure-admin)](https://github.com/pure-admin/vue-pure-admin/stargazers)
 
 ## `Fork`
 
 瞧,那些 `小哥哥` 、`小姐姐` 认真 `学习` 的样子真滴是 `哎呦不错哦` :heart:
 
-[![Forkers repo roster for vue-pure-admin](https://reporoster.com/forks/pure-admin/vue-pure-admin)](https://github.com/pure-admin/vue-pure-admin/network/members)
+[![Forkers repo roster for @pure-admin/vue-pure-admin](https://bytecrank.com/nastyox/reporoster/php/forkersSVG.php?user=pure-admin&repo=vue-pure-admin)](https://github.com/pure-admin/vue-pure-admin/network/members)

+ 0 - 0
commitlint.config.js → commitlint.config.cjs


+ 1 - 1
index.html

@@ -1,4 +1,4 @@
-<!DOCTYPE html>
+<!doctype html>
 <html lang="en">
   <head>
     <meta charset="UTF-8" />

+ 60 - 54
package.json

@@ -2,6 +2,26 @@
   "name": "vue-pure-admin",
   "version": "4.5.0",
   "private": true,
+  "type": "module",
+  "scripts": {
+    "dev": "NODE_OPTIONS=--max-old-space-size=4096 vite",
+    "serve": "pnpm dev",
+    "build": "rimraf dist && NODE_OPTIONS=--max-old-space-size=8192 vite build && generate-version-file",
+    "build:staging": "rimraf dist && vite build --mode staging",
+    "report": "rimraf dist && vite build",
+    "preview": "vite preview",
+    "preview:build": "pnpm build && vite preview",
+    "typecheck": "tsc --noEmit && vue-tsc --noEmit --skipLibCheck",
+    "svgo": "svgo -f src/assets/svg -o src/assets/svg",
+    "cloc": "NODE_OPTIONS=--max-old-space-size=4096 cloc . --exclude-dir=node_modules --exclude-lang=YAML",
+    "clean:cache": "rimraf .eslintcache && rimraf node_modules && pnpm install",
+    "lint:eslint": "eslint --cache --max-warnings 0  \"{src,mock,build}/**/*.{vue,js,ts,tsx}\" --fix",
+    "lint:prettier": "prettier --write  \"src/**/*.{js,ts,json,tsx,css,scss,vue,html,md}\"",
+    "lint:stylelint": "stylelint --cache --fix \"**/*.{html,vue,css,scss}\" --cache --cache-location node_modules/.cache/stylelint/",
+    "lint": "pnpm lint:eslint && pnpm lint:prettier && pnpm lint:stylelint",
+    "prepare": "husky install",
+    "preinstall": "npx only-allow pnpm"
+  },
   "keywords": [
     "vue-pure-admin",
     "element-plus",
@@ -13,38 +33,19 @@
     "vite"
   ],
   "homepage": "https://github.com/pure-admin/vue-pure-admin",
-  "bugs": {
-    "url": "https://github.com/pure-admin/vue-pure-admin/issues"
-  },
   "repository": {
     "type": "git",
     "url": "git+https://github.com/pure-admin/vue-pure-admin.git"
   },
+  "bugs": {
+    "url": "https://github.com/pure-admin/vue-pure-admin/issues"
+  },
   "license": "MIT",
   "author": {
     "name": "xiaoxian521",
     "email": "pureadmin@163.com",
     "url": "https://github.com/xiaoxian521"
   },
-  "scripts": {
-    "dev": "NODE_OPTIONS=--max-old-space-size=4096 vite",
-    "serve": "pnpm dev",
-    "build": "rimraf dist && NODE_OPTIONS=--max-old-space-size=8192 vite build && generate-version-file",
-    "build:staging": "rimraf dist && vite build --mode staging",
-    "report": "rimraf dist && vite build",
-    "preview": "vite preview",
-    "preview:build": "pnpm build && vite preview",
-    "typecheck": "tsc --noEmit && vue-tsc --noEmit --skipLibCheck",
-    "svgo": "svgo -f src/assets/svg -o src/assets/svg",
-    "cloc": "NODE_OPTIONS=--max-old-space-size=4096 cloc . --exclude-dir=node_modules --exclude-lang=YAML",
-    "clean:cache": "rimraf .eslintcache && rimraf node_modules && pnpm install",
-    "lint:eslint": "eslint --cache --max-warnings 0  \"{src,mock,build}/**/*.{vue,js,ts,tsx}\" --fix",
-    "lint:prettier": "prettier --write  \"src/**/*.{js,ts,json,tsx,css,scss,vue,html,md}\"",
-    "lint:stylelint": "stylelint --cache --fix \"**/*.{html,vue,css,scss}\" --cache --cache-location node_modules/.cache/stylelint/",
-    "lint": "pnpm lint:eslint && pnpm lint:prettier && pnpm lint:stylelint",
-    "prepare": "husky install",
-    "preinstall": "npx only-allow pnpm"
-  },
   "dependencies": {
     "@amap/amap-jsapi-loader": "^1.0.1",
     "@howdyjs/mouse-menu": "2.0.9",
@@ -53,19 +54,19 @@
     "@pureadmin/descriptions": "^1.2.0",
     "@pureadmin/table": "^2.3.4",
     "@pureadmin/utils": "^1.9.10",
-    "@vueuse/core": "^10.5.0",
+    "@vueuse/core": "^10.6.0",
     "@vueuse/motion": "^2.0.0",
     "@wangeditor/editor": "^5.1.23",
     "@wangeditor/editor-for-vue": "^5.1.12",
     "@zxcvbn-ts/core": "^3.0.4",
     "animate.css": "^4.1.1",
-    "axios": "^1.6.0",
+    "axios": "^1.6.1",
     "china-area-data": "^5.0.1",
     "cropperjs": "^1.6.1",
     "dayjs": "^1.11.10",
     "echarts": "^5.4.3",
     "el-table-infinite-scroll": "^3.0.3",
-    "element-plus": "^2.4.1",
+    "element-plus": "^2.4.2",
     "intro.js": "^7.2.0",
     "js-cookie": "^3.0.5",
     "jsbarcode": "^3.11.5",
@@ -81,56 +82,57 @@
     "qs": "^6.11.2",
     "responsive-storage": "^2.2.0",
     "sortablejs": "^1.15.0",
-    "swiper": "^11.0.3",
+    "swiper": "^11.0.4",
     "typeit": "^8.7.1",
     "v-contextmenu": "3.0.0",
     "v3-infinite-loading": "^1.3.1",
-    "version-rocket": "^1.7.0",
-    "vue": "^3.3.7",
-    "vue-i18n": "^9.6.2",
+    "version-rocket": "^1.7.1",
+    "vue": "^3.3.8",
+    "vue-i18n": "^9.6.5",
     "vue-json-pretty": "^2.2.4",
     "vue-pdf-embed": "^1.2.1",
     "vue-router": "^4.2.5",
     "vue-tippy": "^6.3.1",
     "vue-types": "^5.1.1",
     "vue-virtual-scroller": "2.0.0-beta.8",
-    "vue-waterfall-plugin-next": "^2.2.4",
+    "vue-waterfall-plugin-next": "^2.2.6",
     "vue3-danmaku": "^1.6.0",
     "vuedraggable": "^4.1.0",
-    "wavesurfer.js": "^7.4.2",
+    "wavesurfer.js": "^7.4.5",
     "xgplayer": "^3.0.9",
     "xlsx": "^0.18.5"
   },
   "devDependencies": {
-    "@commitlint/cli": "^17.7.2",
-    "@commitlint/config-conventional": "^17.7.0",
+    "@commitlint/cli": "^18.2.0",
+    "@commitlint/config-conventional": "^18.1.0",
     "@faker-js/faker": "^8.2.0",
     "@iconify-icons/ep": "^1.2.12",
     "@iconify-icons/ri": "^1.2.10",
     "@iconify/vue": "^4.1.1",
-    "@intlify/unplugin-vue-i18n": "^1.4.0",
+    "@intlify/unplugin-vue-i18n": "^1.5.0",
     "@pureadmin/theme": "^3.2.0",
-    "@types/intro.js": "^5.1.2",
-    "@types/js-cookie": "^3.0.4",
-    "@types/node": "^20.8.2",
+    "@types/intro.js": "^5.1.4",
+    "@types/js-cookie": "^3.0.6",
+    "@types/node": "^20.9.0",
     "@types/nprogress": "0.2.0",
-    "@types/qrcode": "^1.5.2",
-    "@types/qs": "^6.9.8",
-    "@types/sortablejs": "^1.15.3",
-    "@typescript-eslint/eslint-plugin": "^6.7.4",
-    "@typescript-eslint/parser": "^6.7.4",
-    "@vitejs/plugin-vue": "^4.4.0",
+    "@types/qrcode": "^1.5.5",
+    "@types/qs": "^6.9.10",
+    "@types/sortablejs": "^1.15.5",
+    "@typescript-eslint/eslint-plugin": "^6.10.0",
+    "@typescript-eslint/parser": "^6.10.0",
+    "@vitejs/plugin-vue": "^4.4.1",
     "@vitejs/plugin-vue-jsx": "^3.0.2",
     "@vue/eslint-config-prettier": "^8.0.0",
     "@vue/eslint-config-typescript": "^12.0.0",
     "autoprefixer": "^10.4.16",
     "cloc": "^2.11.0",
     "cssnano": "^6.0.1",
-    "eslint": "^8.50.0",
-    "eslint-plugin-prettier": "^5.0.0",
+    "eslint": "^8.53.0",
+    "eslint-define-config": "^1.24.1",
+    "eslint-plugin-prettier": "^5.0.1",
     "eslint-plugin-vue": "^9.18.1",
     "husky": "^8.0.3",
-    "lint-staged": "^14.0.1",
+    "lint-staged": "^15.0.2",
     "picocolors": "^1.0.0",
     "postcss": "^8.4.31",
     "postcss-html": "^1.5.0",
@@ -139,24 +141,23 @@
     "prettier": "^3.0.3",
     "rimraf": "^5.0.5",
     "rollup-plugin-visualizer": "^5.9.2",
-    "sass": "^1.69.0",
+    "sass": "^1.69.5",
     "sass-loader": "^13.3.2",
-    "stylelint": "^15.10.3",
+    "stylelint": "^15.11.0",
     "stylelint-config-html": "^1.1.0",
     "stylelint-config-recess-order": "^4.3.0",
     "stylelint-config-recommended": "^13.0.0",
-    "stylelint-config-recommended-scss": "^13.0.0",
+    "stylelint-config-recommended-scss": "^13.1.0",
     "stylelint-config-recommended-vue": "^1.5.0",
     "stylelint-config-standard": "^34.0.0",
-    "stylelint-config-standard-scss": "^11.0.0",
+    "stylelint-config-standard-scss": "^11.1.0",
     "stylelint-order": "^6.0.3",
     "stylelint-prettier": "^4.0.2",
-    "stylelint-scss": "^5.2.1",
-    "svgo": "^3.0.2",
+    "stylelint-scss": "^5.3.1",
+    "svgo": "^3.0.3",
     "tailwindcss": "^3.3.5",
-    "terser": "^5.24.0",
     "typescript": "^5.2.2",
-    "vite": "^4.5.0",
+    "vite": "5.0.0-beta.17",
     "vite-plugin-cdn-import": "^0.3.5",
     "vite-plugin-compression": "^0.5.1",
     "vite-plugin-fake-server": "^2.0.0",
@@ -165,6 +166,11 @@
     "vue-eslint-parser": "^9.3.2",
     "vue-tsc": "^1.8.22"
   },
+  "engines": {
+    "node": "^18.0.0 || >=20.0.0",
+    "pnpm": ">=8.6.10"
+  },
+  "packageManager": "pnpm@8.6.10",
   "pnpm": {
     "peerDependencyRules": {
       "ignoreMissing": [

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 407 - 288
pnpm-lock.yaml


+ 0 - 0
postcss.config.js → postcss.config.cjs


+ 4 - 1
stylelint.config.js → stylelint.config.cjs

@@ -1,3 +1,6 @@
+// @ts-check
+
+/** @type {import("stylelint").Config} */
 module.exports = {
   root: true,
   extends: [
@@ -81,4 +84,4 @@ module.exports = {
     ]
   },
   ignoreFiles: ["**/*.js", "**/*.ts", "**/*.jsx", "**/*.tsx"]
-}
+};

+ 4 - 3
tailwind.config.js → tailwind.config.ts

@@ -1,5 +1,6 @@
-/** @type {import('tailwindcss').Config} */
-module.exports = {
+import type { Config } from "tailwindcss";
+
+export default {
   darkMode: "class",
   corePlugins: {
     preflight: false
@@ -15,4 +16,4 @@ module.exports = {
       }
     }
   }
-};
+} satisfies Config;

+ 107 - 103
types/global-components.d.ts

@@ -3,10 +3,10 @@ declare module "vue" {
    * 自定义全局组件获得 Volar 提示(自定义的全局组件需要在这里声明下才能获得 Volar 类型提示哦)
    */
   export interface GlobalComponents {
-    IconifyIconOffline: typeof import("../src/components/ReIcon")["IconifyIconOffline"];
-    IconifyIconOnline: typeof import("../src/components/ReIcon")["IconifyIconOnline"];
-    FontIcon: typeof import("../src/components/ReIcon")["FontIcon"];
-    Auth: typeof import("../src/components/ReAuth")["Auth"];
+    IconifyIconOffline: (typeof import("../src/components/ReIcon"))["IconifyIconOffline"];
+    IconifyIconOnline: (typeof import("../src/components/ReIcon"))["IconifyIconOnline"];
+    FontIcon: (typeof import("../src/components/ReIcon"))["FontIcon"];
+    Auth: (typeof import("../src/components/ReAuth"))["Auth"];
   }
 }
 
@@ -16,108 +16,112 @@ declare module "vue" {
  */
 declare module "vue" {
   export interface GlobalComponents {
-    ElAffix: typeof import("element-plus")["ElAffix"];
-    ElAlert: typeof import("element-plus")["ElAlert"];
-    ElAside: typeof import("element-plus")["ElAside"];
-    ElAutocomplete: typeof import("element-plus")["ElAutocomplete"];
-    ElAvatar: typeof import("element-plus")["ElAvatar"];
-    ElBacktop: typeof import("element-plus")["ElBacktop"];
-    ElBadge: typeof import("element-plus")["ElBadge"];
-    ElBreadcrumb: typeof import("element-plus")["ElBreadcrumb"];
-    ElBreadcrumbItem: typeof import("element-plus")["ElBreadcrumbItem"];
-    ElButton: typeof import("element-plus")["ElButton"];
-    ElButtonGroup: typeof import("element-plus")["ElButtonGroup"];
-    ElCalendar: typeof import("element-plus")["ElCalendar"];
-    ElCard: typeof import("element-plus")["ElCard"];
-    ElCarousel: typeof import("element-plus")["ElCarousel"];
-    ElCarouselItem: typeof import("element-plus")["ElCarouselItem"];
-    ElCascader: typeof import("element-plus")["ElCascader"];
-    ElCascaderPanel: typeof import("element-plus")["ElCascaderPanel"];
-    ElCheckbox: typeof import("element-plus")["ElCheckbox"];
-    ElCheckboxButton: typeof import("element-plus")["ElCheckboxButton"];
-    ElCheckboxGroup: typeof import("element-plus")["ElCheckboxGroup"];
-    ElCol: typeof import("element-plus")["ElCol"];
-    ElCollapse: typeof import("element-plus")["ElCollapse"];
-    ElCollapseItem: typeof import("element-plus")["ElCollapseItem"];
-    ElCollapseTransition: typeof import("element-plus")["ElCollapseTransition"];
-    ElColorPicker: typeof import("element-plus")["ElColorPicker"];
-    ElContainer: typeof import("element-plus")["ElContainer"];
-    ElConfigProvider: typeof import("element-plus")["ElConfigProvider"];
-    ElDatePicker: typeof import("element-plus")["ElDatePicker"];
-    ElDialog: typeof import("element-plus")["ElDialog"];
-    ElDivider: typeof import("element-plus")["ElDivider"];
-    ElDrawer: typeof import("element-plus")["ElDrawer"];
-    ElDropdown: typeof import("element-plus")["ElDropdown"];
-    ElDropdownItem: typeof import("element-plus")["ElDropdownItem"];
-    ElDropdownMenu: typeof import("element-plus")["ElDropdownMenu"];
-    ElEmpty: typeof import("element-plus")["ElEmpty"];
-    ElFooter: typeof import("element-plus")["ElFooter"];
-    ElForm: typeof import("element-plus")["ElForm"];
-    ElFormItem: typeof import("element-plus")["ElFormItem"];
-    ElHeader: typeof import("element-plus")["ElHeader"];
-    ElIcon: typeof import("element-plus")["ElIcon"];
-    ElImage: typeof import("element-plus")["ElImage"];
-    ElImageViewer: typeof import("element-plus")["ElImageViewer"];
-    ElInput: typeof import("element-plus")["ElInput"];
-    ElInputNumber: typeof import("element-plus")["ElInputNumber"];
-    ElLink: typeof import("element-plus")["ElLink"];
-    ElMain: typeof import("element-plus")["ElMain"];
-    ElMenu: typeof import("element-plus")["ElMenu"];
-    ElMenuItem: typeof import("element-plus")["ElMenuItem"];
-    ElMenuItemGroup: typeof import("element-plus")["ElMenuItemGroup"];
-    ElOption: typeof import("element-plus")["ElOption"];
-    ElOptionGroup: typeof import("element-plus")["ElOptionGroup"];
-    ElPageHeader: typeof import("element-plus")["ElPageHeader"];
-    ElPagination: typeof import("element-plus")["ElPagination"];
-    ElPopconfirm: typeof import("element-plus")["ElPopconfirm"];
-    ElPopper: typeof import("element-plus")["ElPopper"];
-    ElPopover: typeof import("element-plus")["ElPopover"];
-    ElProgress: typeof import("element-plus")["ElProgress"];
-    ElRadio: typeof import("element-plus")["ElRadio"];
-    ElRadioButton: typeof import("element-plus")["ElRadioButton"];
-    ElRadioGroup: typeof import("element-plus")["ElRadioGroup"];
-    ElRate: typeof import("element-plus")["ElRate"];
-    ElRow: typeof import("element-plus")["ElRow"];
-    ElScrollbar: typeof import("element-plus")["ElScrollbar"];
-    ElSelect: typeof import("element-plus")["ElSelect"];
-    ElSlider: typeof import("element-plus")["ElSlider"];
-    ElStep: typeof import("element-plus")["ElStep"];
-    ElSteps: typeof import("element-plus")["ElSteps"];
-    ElSubMenu: typeof import("element-plus")["ElSubMenu"];
-    ElSwitch: typeof import("element-plus")["ElSwitch"];
-    ElTabPane: typeof import("element-plus")["ElTabPane"];
-    ElTable: typeof import("element-plus")["ElTable"];
-    ElTableColumn: typeof import("element-plus")["ElTableColumn"];
-    ElTabs: typeof import("element-plus")["ElTabs"];
-    ElTag: typeof import("element-plus")["ElTag"];
-    ElTimePicker: typeof import("element-plus")["ElTimePicker"];
-    ElTimeSelect: typeof import("element-plus")["ElTimeSelect"];
-    ElTimeline: typeof import("element-plus")["ElTimeline"];
-    ElTimelineItem: typeof import("element-plus")["ElTimelineItem"];
-    ElTooltip: typeof import("element-plus")["ElTooltip"];
-    ElTransfer: typeof import("element-plus")["ElTransfer"];
-    ElTree: typeof import("element-plus")["ElTree"];
-    ElTreeV2: typeof import("element-plus")["ElTreeV2"];
-    ElUpload: typeof import("element-plus")["ElUpload"];
-    ElSpace: typeof import("element-plus")["ElSpace"];
-    ElSkeleton: typeof import("element-plus")["ElSkeleton"];
-    ElSkeletonItem: typeof import("element-plus")["ElSkeletonItem"];
-    ElCheckTag: typeof import("element-plus")["ElCheckTag"];
-    ElDescriptions: typeof import("element-plus")["ElDescriptions"];
-    ElDescriptionsItem: typeof import("element-plus")["ElDescriptionsItem"];
-    ElResult: typeof import("element-plus")["ElResult"];
-    ElSelectV2: typeof import("element-plus")["ElSelectV2"];
+    ElAffix: (typeof import("element-plus"))["ElAffix"];
+    ElAlert: (typeof import("element-plus"))["ElAlert"];
+    ElAside: (typeof import("element-plus"))["ElAside"];
+    ElAutocomplete: (typeof import("element-plus"))["ElAutocomplete"];
+    ElAvatar: (typeof import("element-plus"))["ElAvatar"];
+    ElBacktop: (typeof import("element-plus"))["ElBacktop"];
+    ElBadge: (typeof import("element-plus"))["ElBadge"];
+    ElBreadcrumb: (typeof import("element-plus"))["ElBreadcrumb"];
+    ElBreadcrumbItem: (typeof import("element-plus"))["ElBreadcrumbItem"];
+    ElButton: (typeof import("element-plus"))["ElButton"];
+    ElButtonGroup: (typeof import("element-plus"))["ElButtonGroup"];
+    ElCalendar: (typeof import("element-plus"))["ElCalendar"];
+    ElCard: (typeof import("element-plus"))["ElCard"];
+    ElCarousel: (typeof import("element-plus"))["ElCarousel"];
+    ElCarouselItem: (typeof import("element-plus"))["ElCarouselItem"];
+    ElCascader: (typeof import("element-plus"))["ElCascader"];
+    ElCascaderPanel: (typeof import("element-plus"))["ElCascaderPanel"];
+    ElCheckbox: (typeof import("element-plus"))["ElCheckbox"];
+    ElCheckboxButton: (typeof import("element-plus"))["ElCheckboxButton"];
+    ElCheckboxGroup: (typeof import("element-plus"))["ElCheckboxGroup"];
+    ElCol: (typeof import("element-plus"))["ElCol"];
+    ElCollapse: (typeof import("element-plus"))["ElCollapse"];
+    ElCollapseItem: (typeof import("element-plus"))["ElCollapseItem"];
+    ElCollapseTransition: (typeof import("element-plus"))["ElCollapseTransition"];
+    ElColorPicker: (typeof import("element-plus"))["ElColorPicker"];
+    ElContainer: (typeof import("element-plus"))["ElContainer"];
+    ElConfigProvider: (typeof import("element-plus"))["ElConfigProvider"];
+    ElDatePicker: (typeof import("element-plus"))["ElDatePicker"];
+    ElDialog: (typeof import("element-plus"))["ElDialog"];
+    ElDivider: (typeof import("element-plus"))["ElDivider"];
+    ElDrawer: (typeof import("element-plus"))["ElDrawer"];
+    ElDropdown: (typeof import("element-plus"))["ElDropdown"];
+    ElDropdownItem: (typeof import("element-plus"))["ElDropdownItem"];
+    ElDropdownMenu: (typeof import("element-plus"))["ElDropdownMenu"];
+    ElEmpty: (typeof import("element-plus"))["ElEmpty"];
+    ElFooter: (typeof import("element-plus"))["ElFooter"];
+    ElForm: (typeof import("element-plus"))["ElForm"];
+    ElFormItem: (typeof import("element-plus"))["ElFormItem"];
+    ElHeader: (typeof import("element-plus"))["ElHeader"];
+    ElIcon: (typeof import("element-plus"))["ElIcon"];
+    ElImage: (typeof import("element-plus"))["ElImage"];
+    ElImageViewer: (typeof import("element-plus"))["ElImageViewer"];
+    ElInput: (typeof import("element-plus"))["ElInput"];
+    ElInputNumber: (typeof import("element-plus"))["ElInputNumber"];
+    ElLink: (typeof import("element-plus"))["ElLink"];
+    ElMain: (typeof import("element-plus"))["ElMain"];
+    ElMenu: (typeof import("element-plus"))["ElMenu"];
+    ElMenuItem: (typeof import("element-plus"))["ElMenuItem"];
+    ElMenuItemGroup: (typeof import("element-plus"))["ElMenuItemGroup"];
+    ElOption: (typeof import("element-plus"))["ElOption"];
+    ElOptionGroup: (typeof import("element-plus"))["ElOptionGroup"];
+    ElPageHeader: (typeof import("element-plus"))["ElPageHeader"];
+    ElPagination: (typeof import("element-plus"))["ElPagination"];
+    ElPopconfirm: (typeof import("element-plus"))["ElPopconfirm"];
+    ElPopper: (typeof import("element-plus"))["ElPopper"];
+    ElPopover: (typeof import("element-plus"))["ElPopover"];
+    ElProgress: (typeof import("element-plus"))["ElProgress"];
+    ElRadio: (typeof import("element-plus"))["ElRadio"];
+    ElRadioButton: (typeof import("element-plus"))["ElRadioButton"];
+    ElRadioGroup: (typeof import("element-plus"))["ElRadioGroup"];
+    ElRate: (typeof import("element-plus"))["ElRate"];
+    ElRow: (typeof import("element-plus"))["ElRow"];
+    ElScrollbar: (typeof import("element-plus"))["ElScrollbar"];
+    ElSelect: (typeof import("element-plus"))["ElSelect"];
+    ElSlider: (typeof import("element-plus"))["ElSlider"];
+    ElStep: (typeof import("element-plus"))["ElStep"];
+    ElSteps: (typeof import("element-plus"))["ElSteps"];
+    ElSubMenu: (typeof import("element-plus"))["ElSubMenu"];
+    ElSwitch: (typeof import("element-plus"))["ElSwitch"];
+    ElTabPane: (typeof import("element-plus"))["ElTabPane"];
+    ElTable: (typeof import("element-plus"))["ElTable"];
+    ElTableColumn: (typeof import("element-plus"))["ElTableColumn"];
+    ElTabs: (typeof import("element-plus"))["ElTabs"];
+    ElTag: (typeof import("element-plus"))["ElTag"];
+    ElText: (typeof import("element-plus"))["ElText"];
+    ElTimePicker: (typeof import("element-plus"))["ElTimePicker"];
+    ElTimeSelect: (typeof import("element-plus"))["ElTimeSelect"];
+    ElTimeline: (typeof import("element-plus"))["ElTimeline"];
+    ElTimelineItem: (typeof import("element-plus"))["ElTimelineItem"];
+    ElTooltip: (typeof import("element-plus"))["ElTooltip"];
+    ElTransfer: (typeof import("element-plus"))["ElTransfer"];
+    ElTree: (typeof import("element-plus"))["ElTree"];
+    ElTreeV2: (typeof import("element-plus"))["ElTreeV2"];
+    ElTreeSelect: (typeof import("element-plus"))["ElTreeSelect"];
+    ElUpload: (typeof import("element-plus"))["ElUpload"];
+    ElSpace: (typeof import("element-plus"))["ElSpace"];
+    ElSkeleton: (typeof import("element-plus"))["ElSkeleton"];
+    ElSkeletonItem: (typeof import("element-plus"))["ElSkeletonItem"];
+    ElStatistic: (typeof import("element-plus"))["ElStatistic"];
+    ElCheckTag: (typeof import("element-plus"))["ElCheckTag"];
+    ElDescriptions: (typeof import("element-plus"))["ElDescriptions"];
+    ElDescriptionsItem: (typeof import("element-plus"))["ElDescriptionsItem"];
+    ElResult: (typeof import("element-plus"))["ElResult"];
+    ElSelectV2: (typeof import("element-plus"))["ElSelectV2"];
+    ElWatermark: (typeof import("element-plus"))["ElWatermark"];
   }
 
   interface ComponentCustomProperties {
-    $message: typeof import("element-plus")["ElMessage"];
-    $notify: typeof import("element-plus")["ElNotification"];
-    $msgbox: typeof import("element-plus")["ElMessageBox"];
-    $messageBox: typeof import("element-plus")["ElMessageBox"];
-    $alert: typeof import("element-plus")["ElMessageBox"]["alert"];
-    $confirm: typeof import("element-plus")["ElMessageBox"]["confirm"];
-    $prompt: typeof import("element-plus")["ElMessageBox"]["prompt"];
-    $loading: typeof import("element-plus")["ElLoadingService"];
+    $message: (typeof import("element-plus"))["ElMessage"];
+    $notify: (typeof import("element-plus"))["ElNotification"];
+    $msgbox: (typeof import("element-plus"))["ElMessageBox"];
+    $messageBox: (typeof import("element-plus"))["ElMessageBox"];
+    $alert: (typeof import("element-plus"))["ElMessageBox"]["alert"];
+    $confirm: (typeof import("element-plus"))["ElMessageBox"]["confirm"];
+    $prompt: (typeof import("element-plus"))["ElMessageBox"]["prompt"];
+    $loading: (typeof import("element-plus"))["ElLoadingService"];
   }
 }
 

+ 5 - 3
vite.config.ts

@@ -37,13 +37,15 @@ export default ({ command, mode }: ConfigEnv): UserConfigExport => {
     },
     // 服务端渲染
     server: {
-      // 是否开启 https
-      https: false,
       // 端口号
       port: VITE_PORT,
       host: "0.0.0.0",
       // 本地跨域代理 https://cn.vitejs.dev/config/server-options.html#server-proxy
-      proxy: {}
+      proxy: {},
+      // 预热文件以提前转换和缓存结果,降低启动期间的初始页面加载时长并防止转换瀑布
+      warmup: {
+        clientFiles: ["./index.html", "./src/{views,components}/*"]
+      }
     },
     plugins: getPluginsList(command, VITE_CDN, VITE_COMPRESSION),
     // https://cn.vitejs.dev/config/dep-optimization-options.html#dep-optimization-options

برخی فایل ها در این مقایسه diff نمایش داده نمی شوند زیرا تعداد فایل ها بسیار زیاد است