chore: update

This commit is contained in:
xiaoxian521 2023-11-16 22:01:20 +08:00
parent 8d5766c1cc
commit 86f4775459
7 changed files with 517 additions and 270 deletions

View File

@ -3,6 +3,7 @@ import { resolve } from "path";
import vue from "@vitejs/plugin-vue"; import vue from "@vitejs/plugin-vue";
import { viteBuildInfo } from "./info"; import { viteBuildInfo } from "./info";
import svgLoader from "vite-svg-loader"; import svgLoader from "vite-svg-loader";
import type { PluginOption } from "vite";
import vueJsx from "@vitejs/plugin-vue-jsx"; import vueJsx from "@vitejs/plugin-vue-jsx";
import { configCompressPlugin } from "./compress"; import { configCompressPlugin } from "./compress";
import { visualizer } from "rollup-plugin-visualizer"; import { visualizer } from "rollup-plugin-visualizer";
@ -13,10 +14,9 @@ import { genScssMultipleScopeVars } from "../src/layout/theme";
import { vitePluginFakeServer } from "vite-plugin-fake-server"; import { vitePluginFakeServer } from "vite-plugin-fake-server";
export function getPluginsList( export function getPluginsList(
command: string,
VITE_CDN: boolean, VITE_CDN: boolean,
VITE_COMPRESSION: ViteCompression VITE_COMPRESSION: ViteCompression
) { ): PluginOption[] {
const lifecycle = process.env.npm_lifecycle_event; const lifecycle = process.env.npm_lifecycle_event;
return [ return [
vue(), vue(),
@ -51,6 +51,6 @@ export function getPluginsList(
// 打包分析 // 打包分析
lifecycle === "report" lifecycle === "report"
? visualizer({ open: true, brotliSize: true, filename: "report.html" }) ? visualizer({ open: true, brotliSize: true, filename: "report.html" })
: null : (null as any)
]; ];
} }

View File

@ -52,15 +52,15 @@
"@logicflow/core": "^1.2.17", "@logicflow/core": "^1.2.17",
"@logicflow/extension": "^1.2.18", "@logicflow/extension": "^1.2.18",
"@pureadmin/descriptions": "^1.2.0", "@pureadmin/descriptions": "^1.2.0",
"@pureadmin/table": "^2.3.4", "@pureadmin/table": "^2.4.0",
"@pureadmin/utils": "^1.9.10", "@pureadmin/utils": "^1.9.10",
"@vueuse/core": "^10.6.0", "@vueuse/core": "^10.6.1",
"@vueuse/motion": "^2.0.0", "@vueuse/motion": "^2.0.0",
"@wangeditor/editor": "^5.1.23", "@wangeditor/editor": "^5.1.23",
"@wangeditor/editor-for-vue": "^5.1.12", "@wangeditor/editor-for-vue": "^5.1.12",
"@zxcvbn-ts/core": "^3.0.4", "@zxcvbn-ts/core": "^3.0.4",
"animate.css": "^4.1.1", "animate.css": "^4.1.1",
"axios": "^1.6.1", "axios": "^1.6.2",
"china-area-data": "^5.0.1", "china-area-data": "^5.0.1",
"cropperjs": "^1.6.1", "cropperjs": "^1.6.1",
"dayjs": "^1.11.10", "dayjs": "^1.11.10",
@ -69,7 +69,7 @@
"element-plus": "^2.4.2", "element-plus": "^2.4.2",
"intro.js": "^7.2.0", "intro.js": "^7.2.0",
"js-cookie": "^3.0.5", "js-cookie": "^3.0.5",
"jsbarcode": "^3.11.5", "jsbarcode": "^3.11.6",
"localforage": "^1.10.0", "localforage": "^1.10.0",
"md-editor-v3": "2.7.2", "md-editor-v3": "2.7.2",
"mint-filter": "^4.0.3", "mint-filter": "^4.0.3",
@ -77,7 +77,7 @@
"nprogress": "^0.2.0", "nprogress": "^0.2.0",
"path": "^0.12.7", "path": "^0.12.7",
"pinia": "^2.1.7", "pinia": "^2.1.7",
"pinyin-pro": "^3.17.0", "pinyin-pro": "^3.18.1",
"qrcode": "^1.5.3", "qrcode": "^1.5.3",
"qs": "^6.11.2", "qs": "^6.11.2",
"responsive-storage": "^2.2.0", "responsive-storage": "^2.2.0",
@ -88,18 +88,18 @@
"v3-infinite-loading": "^1.3.1", "v3-infinite-loading": "^1.3.1",
"version-rocket": "^1.7.1", "version-rocket": "^1.7.1",
"vue": "^3.3.8", "vue": "^3.3.8",
"vue-i18n": "^9.6.5", "vue-i18n": "^9.7.0",
"vue-json-pretty": "^2.2.4", "vue-json-pretty": "^2.2.4",
"vue-pdf-embed": "^1.2.1", "vue-pdf-embed": "^1.2.1",
"vue-router": "^4.2.5", "vue-router": "^4.2.5",
"vue-tippy": "^6.3.1", "vue-tippy": "^6.3.1",
"vue-types": "^5.1.1", "vue-types": "^5.1.1",
"vue-virtual-scroller": "2.0.0-beta.8", "vue-virtual-scroller": "2.0.0-beta.8",
"vue-waterfall-plugin-next": "^2.2.6", "vue-waterfall-plugin-next": "^2.2.8",
"vue3-danmaku": "^1.6.0", "vue3-danmaku": "^1.6.0",
"vuedraggable": "^4.1.0", "vuedraggable": "^4.1.0",
"wavesurfer.js": "^7.4.5", "wavesurfer.js": "^7.4.5",
"xgplayer": "^3.0.9", "xgplayer": "^3.0.10",
"xlsx": "^0.18.5" "xlsx": "^0.18.5"
}, },
"devDependencies": { "devDependencies": {
@ -107,7 +107,7 @@
"@commitlint/config-conventional": "^18.4.2", "@commitlint/config-conventional": "^18.4.2",
"@commitlint/types": "^18.4.0", "@commitlint/types": "^18.4.0",
"@eslint/js": "^8.53.0", "@eslint/js": "^8.53.0",
"@faker-js/faker": "^8.2.0", "@faker-js/faker": "^8.3.1",
"@iconify-icons/ep": "^1.2.12", "@iconify-icons/ep": "^1.2.12",
"@iconify-icons/ri": "^1.2.10", "@iconify-icons/ri": "^1.2.10",
"@iconify/vue": "^4.1.1", "@iconify/vue": "^4.1.1",
@ -120,10 +120,10 @@
"@types/qrcode": "^1.5.5", "@types/qrcode": "^1.5.5",
"@types/qs": "^6.9.10", "@types/qs": "^6.9.10",
"@types/sortablejs": "^1.15.5", "@types/sortablejs": "^1.15.5",
"@typescript-eslint/eslint-plugin": "^6.10.0", "@typescript-eslint/eslint-plugin": "^6.11.0",
"@typescript-eslint/parser": "^6.10.0", "@typescript-eslint/parser": "^6.11.0",
"@vitejs/plugin-vue": "^4.4.1", "@vitejs/plugin-vue": "^4.5.0",
"@vitejs/plugin-vue-jsx": "^3.0.2", "@vitejs/plugin-vue-jsx": "^3.1.0",
"autoprefixer": "^10.4.16", "autoprefixer": "^10.4.16",
"cloc": "^2.11.0", "cloc": "^2.11.0",
"cssnano": "^6.0.1", "cssnano": "^6.0.1",
@ -133,13 +133,13 @@
"eslint-plugin-prettier": "^5.0.1", "eslint-plugin-prettier": "^5.0.1",
"eslint-plugin-vue": "^9.18.1", "eslint-plugin-vue": "^9.18.1",
"husky": "^8.0.3", "husky": "^8.0.3",
"lint-staged": "^15.0.2", "lint-staged": "^15.1.0",
"picocolors": "^1.0.0", "picocolors": "^1.0.0",
"postcss": "^8.4.31", "postcss": "^8.4.31",
"postcss-html": "^1.5.0", "postcss-html": "^1.5.0",
"postcss-import": "^15.1.0", "postcss-import": "^15.1.0",
"postcss-scss": "^4.0.9", "postcss-scss": "^4.0.9",
"prettier": "^3.0.3", "prettier": "^3.1.0",
"rimraf": "^5.0.5", "rimraf": "^5.0.5",
"rollup-plugin-visualizer": "^5.9.2", "rollup-plugin-visualizer": "^5.9.2",
"sass": "^1.69.5", "sass": "^1.69.5",
@ -158,7 +158,7 @@
"svgo": "^3.0.3", "svgo": "^3.0.3",
"tailwindcss": "^3.3.5", "tailwindcss": "^3.3.5",
"typescript": "^5.2.2", "typescript": "^5.2.2",
"vite": "5.0.0-beta.17", "vite": "^5.0.0",
"vite-plugin-cdn-import": "^0.3.5", "vite-plugin-cdn-import": "^0.3.5",
"vite-plugin-compression": "^0.5.1", "vite-plugin-compression": "^0.5.1",
"vite-plugin-fake-server": "^2.0.0", "vite-plugin-fake-server": "^2.0.0",
@ -173,13 +173,6 @@
}, },
"packageManager": "pnpm@8.6.10", "packageManager": "pnpm@8.6.10",
"pnpm": { "pnpm": {
"peerDependencyRules": {
"ignoreMissing": [
"rollup",
"webpack",
"core-js"
]
},
"allowedDeprecatedVersions": { "allowedDeprecatedVersions": {
"sourcemap-codec": "*", "sourcemap-codec": "*",
"w3c-hr-time": "*", "w3c-hr-time": "*",

720
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff

View File

@ -116,8 +116,8 @@ function handleClose(
options?.fullscreen options?.fullscreen
? ExitFullscreen ? ExitFullscreen
: fullscreen : fullscreen
? ExitFullscreen ? ExitFullscreen
: Fullscreen : Fullscreen
" "
/> />
</i> </i>

View File

@ -60,8 +60,8 @@ const getsubMenuIconStyle = computed((): CSSProperties => {
layout.value === "horizontal" layout.value === "horizontal"
? "0 5px 0 0" ? "0 5px 0 0"
: isCollapse.value : isCollapse.value
? "0 auto" ? "0 auto"
: "0 5px 0 0" : "0 5px 0 0"
}; };
}); });
@ -96,8 +96,8 @@ const getSubMenuDivStyle = computed((): any => {
item?.parentId === null item?.parentId === null
? "center" ? "center"
: layout.value === "mix" && item?.pathList?.length === 2 : layout.value === "mix" && item?.pathList?.length === 2
? "center" ? "center"
: "" : ""
}; };
}; };
}); });

View File

@ -191,8 +191,8 @@ defineExpose({ onTreeReset });
data.type === 1 data.type === 1
? OfficeBuilding ? OfficeBuilding
: data.type === 2 : data.type === 2
? LocationCompany ? LocationCompany
: Dept : Dept
" "
/> />
{{ node.label }} {{ node.label }}

View File

@ -4,7 +4,7 @@ import pkg from "./package.json";
import { warpperEnv } from "./build"; import { warpperEnv } from "./build";
import { getPluginsList } from "./build/plugins"; import { getPluginsList } from "./build/plugins";
import { include, exclude } from "./build/optimize"; import { include, exclude } from "./build/optimize";
import { UserConfigExport, ConfigEnv, loadEnv } from "vite"; import { type UserConfigExport, type ConfigEnv, loadEnv } from "vite";
/** 当前执行node命令时文件夹的地址工作目录 */ /** 当前执行node命令时文件夹的地址工作目录 */
const root: string = process.cwd(); const root: string = process.cwd();
@ -26,7 +26,7 @@ const __APP_INFO__ = {
lastBuildTime: dayjs(new Date()).format("YYYY-MM-DD HH:mm:ss") lastBuildTime: dayjs(new Date()).format("YYYY-MM-DD HH:mm:ss")
}; };
export default ({ command, mode }: ConfigEnv): UserConfigExport => { export default ({ mode }: ConfigEnv): UserConfigExport => {
const { VITE_CDN, VITE_PORT, VITE_COMPRESSION, VITE_PUBLIC_PATH } = const { VITE_CDN, VITE_PORT, VITE_COMPRESSION, VITE_PUBLIC_PATH } =
warpperEnv(loadEnv(mode, root)); warpperEnv(loadEnv(mode, root));
return { return {
@ -47,7 +47,7 @@ export default ({ command, mode }: ConfigEnv): UserConfigExport => {
clientFiles: ["./index.html", "./src/{views,components}/*"] clientFiles: ["./index.html", "./src/{views,components}/*"]
} }
}, },
plugins: getPluginsList(command, VITE_CDN, VITE_COMPRESSION), plugins: getPluginsList(VITE_CDN, VITE_COMPRESSION),
// https://cn.vitejs.dev/config/dep-optimization-options.html#dep-optimization-options // https://cn.vitejs.dev/config/dep-optimization-options.html#dep-optimization-options
optimizeDeps: { optimizeDeps: {
include, include,