diff --git a/.env.base b/.env.base index 7e2fb8f..8f60256 100644 --- a/.env.base +++ b/.env.base @@ -1,5 +1,5 @@ # 环境 -NODE_ENV=development +VITE_NODE_ENV=development # 接口前缀 VITE_API_BASE_PATH= @@ -9,3 +9,12 @@ VITE_BASE_PATH=/ # 标题 VITE_APP_TITLE=ElementAdmin + +# 是否全量引入element-plus样式 +VITE_USE_ALL_ELEMENT_PLUS_STYLE=true + +# 是否开启mock +VITE_USE_MOCK=true + +# 是否使用在线图标 +VITE_USE_ONLINE_ICON=true \ No newline at end of file diff --git a/.env.dev b/.env.dev index afc3cee..4727386 100644 --- a/.env.dev +++ b/.env.dev @@ -1,5 +1,5 @@ # 环境 -NODE_ENV=production +VITE_NODE_ENV=production # 接口前缀 VITE_API_BASE_PATH= @@ -21,3 +21,18 @@ VITE_OUT_DIR=dist-dev # 标题 VITE_APP_TITLE=ElementAdmin + +# 是否包分析 +VITE_USE_BUNDLE_ANALYZER=false + +# 是否全量引入element-plus样式 +VITE_USE_ALL_ELEMENT_PLUS_STYLE=false + +# 是否开启mock +VITE_USE_MOCK=true + +# 是否切割css +VITE_USE_CSS_SPLIT=true + +# 是否使用在线图标 +VITE_USE_ONLINE_ICON=true \ No newline at end of file diff --git a/.env.gitee b/.env.gitee index 9ac2a52..bcd0b11 100644 --- a/.env.gitee +++ b/.env.gitee @@ -1,5 +1,5 @@ # 环境 -NODE_ENV=production +VITE_NODE_ENV=production # 接口前缀 VITE_API_BASE_PATH= @@ -21,3 +21,18 @@ VITE_OUT_DIR=dist-pro # 标题 VITE_APP_TITLE=ElementAdmin + +# 是否包分析 +VITE_USE_BUNDLE_ANALYZER=false + +# 是否全量引入element-plus样式 +VITE_USE_ALL_ELEMENT_PLUS_STYLE=false + +# 是否开启mock +VITE_USE_MOCK=true + +# 是否切割css +VITE_USE_CSS_SPLIT=true + +# 是否使用在线图标 +VITE_USE_ONLINE_ICON=true \ No newline at end of file diff --git a/.env.pro b/.env.pro index 432fc46..06aad7f 100644 --- a/.env.pro +++ b/.env.pro @@ -1,5 +1,5 @@ # 环境 -NODE_ENV=production +VITE_NODE_ENV=production # 接口前缀 VITE_API_BASE_PATH= @@ -21,3 +21,18 @@ VITE_OUT_DIR=dist-pro # 标题 VITE_APP_TITLE=ElementAdmin + +# 是否包分析 +VITE_USE_BUNDLE_ANALYZER=true + +# 是否全量引入element-plus样式 +VITE_USE_ALL_ELEMENT_PLUS_STYLE=false + +# 是否开启mock +VITE_USE_MOCK=true + +# 是否切割css +VITE_USE_CSS_SPLIT=true + +# 是否使用在线图标 +VITE_USE_ONLINE_ICON=true \ No newline at end of file diff --git a/.env.test b/.env.test index 00d8f8a..e4a77bf 100644 --- a/.env.test +++ b/.env.test @@ -1,8 +1,8 @@ # 环境 -NODE_ENV=production +VITE_NODE_ENV=production # 接口前缀 -VITE_API_BASE_PATH=test +VITE_API_BASE_PATH= # 打包路径 VITE_BASE_PATH=/dist-test/ @@ -21,3 +21,15 @@ VITE_OUT_DIR=dist-test # 标题 VITE_APP_TITLE=ElementAdmin + +# 是否包分析 +VITE_USE_BUNDLE_ANALYZER=false + +# 是否全量引入element-plus样式 +VITE_USE_ALL_ELEMENT_PLUS_STYLE=false + +# 是否开启mock +VITE_USE_MOCK=true + +# 是否切割css +VITE_USE_CSS_SPLIT=false \ No newline at end of file diff --git a/.gitignore b/.gitignore index 0b05e6a..c4af407 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,4 @@ dist-ssr /dist* *-lock.* pnpm-debug +stats.html diff --git a/package.json b/package.json index e2bb6b4..8b7dc95 100644 --- a/package.json +++ b/package.json @@ -61,7 +61,6 @@ "@commitlint/config-conventional": "^18.4.3", "@iconify/json": "^2.2.153", "@intlify/unplugin-vue-i18n": "^1.5.0", - "@purge-icons/generated": "^0.10.0", "@types/fs-extra": "^11.0.4", "@types/inquirer": "^9.0.7", "@types/lodash-es": "^4.17.12", @@ -97,6 +96,7 @@ "prettier": "^3.1.0", "rimraf": "^5.0.5", "rollup": "^4.6.1", + "rollup-plugin-visualizer": "^5.12.0", "stylelint": "^15.11.0", "stylelint-config-html": "^1.1.0", "stylelint-config-recommended": "^13.0.0", diff --git a/src/components/Icon/src/Icon.vue b/src/components/Icon/src/Icon.vue index 008fd8a..1b5bc4c 100644 --- a/src/components/Icon/src/Icon.vue +++ b/src/components/Icon/src/Icon.vue @@ -25,6 +25,11 @@ const symbolId = computed(() => { return unref(isLocal) ? `#icon-${props.icon.split('svg-icon:')[1]}` : props.icon }) +// 是否使用在线图标 +const isUseOnline = computed(() => { + return import.meta.env.VITE_USE_ONLINE_ICON === 'true' +}) + const getIconifyStyle = computed(() => { const { color, size } = props return { @@ -40,7 +45,10 @@ const getIconifyStyle = computed(() => { - + @@ -49,11 +57,18 @@ const getIconifyStyle = computed(() => { .@{prefix-cls}, .iconify { - &:hover { - :deep(svg) { + :deep(svg) { + &:hover { // stylelint-disable-next-line color: v-bind(hoverColor) !important; } } } + +.iconify { + &:hover { + // stylelint-disable-next-line + color: v-bind(hoverColor) !important; + } +} diff --git a/src/components/Setting/src/Setting.vue b/src/components/Setting/src/Setting.vue index 3581761..b9972f4 100644 --- a/src/components/Setting/src/Setting.vue +++ b/src/components/Setting/src/Setting.vue @@ -1,12 +1,12 @@