Skip to content

Commit fd4cad8

Browse files
author
xiaoxian521
committed
release: update 2.9.0
1 parent e33bdb5 commit fd4cad8

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+1022
-1122
lines changed

CHANGELOG.en_US.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,14 @@
1+
# 2.9.0 (2022-2-5)
2+
3+
### 🎫 Feat
4+
5+
- Added package size analysis, command `pnpm report`
6+
7+
### 🍏 Perf
8+
9+
- Use `iconify` to introduce icons on demand, optimize icon size, and reduce network requests
10+
- Optimize the route, the route can not pass `showLink: true`, it is displayed by default
11+
112
# 2.8.5 (2022-1-21)
213

314
### 🎫 Feat

CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,14 @@
1+
# 2.9.0 (2022-2-5)
2+
3+
### 🎫 Feat
4+
5+
- Added package size analysis, command `pnpm report`
6+
7+
### 🍏 Perf
8+
9+
- Use `iconify` to introduce icons on demand, optimize icon size, and reduce network requests
10+
- Optimize the route, the route can not pass `showLink: true`, it is displayed by default
11+
112
# 2.8.5 (2022-1-21)
213

314
### 🎫 Feat

CHANGELOG.zh_CN.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,14 @@
1+
# 2.9.0(2022-2-5)
2+
3+
### 🎫 Feat
4+
5+
- 添加打包大小分析,命令`pnpm report`
6+
7+
### 🍏 Perf
8+
9+
- 采用`iconify`按需引入图标,优化图标大小,减少网络请求
10+
- 优化路由,路由可不传`showLink: true`,默认显示
11+
112
# 2.8.5(2022-1-21)
213

314
### 🎫 Feat

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2021 啝裳
3+
Copyright (c) 2022 啝裳
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

build/plugins.ts

Lines changed: 121 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,121 @@
1+
import vue from "@vitejs/plugin-vue";
2+
import svgLoader from "vite-svg-loader";
3+
import legacy from "@vitejs/plugin-legacy";
4+
import vueJsx from "@vitejs/plugin-vue-jsx";
5+
import WindiCSS from "vite-plugin-windicss";
6+
import { viteMockServe } from "vite-plugin-mock";
7+
import liveReload from "vite-plugin-live-reload";
8+
import styleImport from "vite-plugin-style-import";
9+
import ElementPlus from "unplugin-element-plus/vite";
10+
import { visualizer } from "rollup-plugin-visualizer";
11+
import removeConsole from "vite-plugin-remove-console";
12+
import themePreprocessorPlugin from "@zougt/vite-plugin-theme-preprocessor";
13+
14+
export function getPluginsList(command, VITE_LEGACY) {
15+
const prodMock = true;
16+
const lifecycle = process.env.npm_lifecycle_event;
17+
return [
18+
vue(),
19+
// jsx、tsx语法支持
20+
vueJsx(),
21+
WindiCSS(),
22+
// 线上环境删除console
23+
removeConsole(),
24+
// 修改layout文件夹下的文件时自动重载浏览器 解决 https://github.com/xiaoxian521/vue-pure-admin/issues/170
25+
liveReload(["src/layout/**/*", "src/router/**/*"]),
26+
// 自定义主题
27+
themePreprocessorPlugin({
28+
scss: {
29+
multipleScopeVars: [
30+
{
31+
scopeName: "layout-theme-default",
32+
path: "src/layout/theme/default-vars.scss"
33+
},
34+
{
35+
scopeName: "layout-theme-light",
36+
path: "src/layout/theme/light-vars.scss"
37+
},
38+
{
39+
scopeName: "layout-theme-dusk",
40+
path: "src/layout/theme/dusk-vars.scss"
41+
},
42+
{
43+
scopeName: "layout-theme-volcano",
44+
path: "src/layout/theme/volcano-vars.scss"
45+
},
46+
{
47+
scopeName: "layout-theme-yellow",
48+
path: "src/layout/theme/yellow-vars.scss"
49+
},
50+
{
51+
scopeName: "layout-theme-mingQing",
52+
path: "src/layout/theme/mingQing-vars.scss"
53+
},
54+
{
55+
scopeName: "layout-theme-auroraGreen",
56+
path: "src/layout/theme/auroraGreen-vars.scss"
57+
},
58+
{
59+
scopeName: "layout-theme-pink",
60+
path: "src/layout/theme/pink-vars.scss"
61+
},
62+
{
63+
scopeName: "layout-theme-saucePurple",
64+
path: "src/layout/theme/saucePurple-vars.scss"
65+
}
66+
],
67+
// 默认取 multipleScopeVars[0].scopeName
68+
defaultScopeName: "",
69+
// 在生产模式是否抽取独立的主题css文件,extract为true以下属性有效
70+
extract: true,
71+
// 独立主题css文件的输出路径,默认取 viteConfig.build.assetsDir 相对于 (viteConfig.build.outDir)
72+
outputDir: "",
73+
// 会选取defaultScopeName对应的主题css文件在html添加link
74+
themeLinkTagId: "head",
75+
// "head"||"head-prepend" || "body" ||"body-prepend"
76+
themeLinkTagInjectTo: "head",
77+
// 是否对抽取的css文件内对应scopeName的权重类名移除
78+
removeCssScopeName: false,
79+
// 可以自定义css文件名称的函数
80+
customThemeCssFileName: scopeName => scopeName
81+
}
82+
}),
83+
// svg组件化支持
84+
svgLoader(),
85+
// 按需加载vxe-table
86+
styleImport({
87+
libs: [
88+
{
89+
libraryName: "vxe-table",
90+
esModule: true,
91+
ensureStyleFile: true,
92+
resolveComponent: name => `vxe-table/es/${name}`,
93+
resolveStyle: name => `vxe-table/es/${name}/style.css`
94+
}
95+
]
96+
}),
97+
ElementPlus({}),
98+
// mock支持
99+
viteMockServe({
100+
mockPath: "mock",
101+
localEnabled: command === "serve",
102+
prodEnabled: command !== "serve" && prodMock,
103+
injectCode: `
104+
import { setupProdMockServer } from './mockProdServer';
105+
setupProdMockServer();
106+
`,
107+
logger: true
108+
}),
109+
// 是否为打包后的文件提供传统浏览器兼容性支持
110+
VITE_LEGACY
111+
? legacy({
112+
targets: ["ie >= 11"],
113+
additionalLegacyPolyfills: ["regenerator-runtime/runtime"]
114+
})
115+
: null,
116+
// 打包分析
117+
lifecycle === "report"
118+
? visualizer({ open: true, brotliSize: true, filename: "report.html" })
119+
: null
120+
];
121+
}

index.html

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
<head>
44
<meta charset="UTF-8" />
55
<link rel="icon" href="/favicon.ico" />
6-
<link rel="stylesheet" href="/iconfont.css" />
76
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
87
<title>vue-pure-admin</title>
98
<script src="/sortable.min.js"></script>

mock/asyncRoutes.ts

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ const systemRouter = {
1010
icon: "setting",
1111
title: "menus.hssysManagement",
1212
i18n: true,
13-
showLink: true,
1413
rank: 6
1514
},
1615
children: [
@@ -19,8 +18,7 @@ const systemRouter = {
1918
name: "user",
2019
meta: {
2120
title: "menus.hsBaseinfo",
22-
i18n: true,
23-
showLink: true
21+
i18n: true
2422
}
2523
},
2624
{
@@ -29,7 +27,6 @@ const systemRouter = {
2927
meta: {
3028
title: "menus.hsDict",
3129
i18n: true,
32-
showLink: true,
3330
keepAlive: true
3431
}
3532
}
@@ -44,7 +41,6 @@ const permissionRouter = {
4441
title: "menus.permission",
4542
icon: "lollipop",
4643
i18n: true,
47-
showLink: true,
4844
rank: 3
4945
},
5046
children: [
@@ -53,8 +49,7 @@ const permissionRouter = {
5349
name: "permissionPage",
5450
meta: {
5551
title: "menus.permissionPage",
56-
i18n: true,
57-
showLink: true
52+
i18n: true
5853
}
5954
},
6055
{
@@ -63,7 +58,6 @@ const permissionRouter = {
6358
meta: {
6459
title: "menus.permissionButton",
6560
i18n: true,
66-
showLink: true,
6761
authority: []
6862
}
6963
}
@@ -78,7 +72,6 @@ const tabsRouter = {
7872
icon: "IF-team-icontabs",
7973
title: "menus.hstabs",
8074
i18n: true,
81-
showLink: true,
8275
rank: 8
8376
},
8477
children: [
@@ -87,7 +80,6 @@ const tabsRouter = {
8780
name: "reTabs",
8881
meta: {
8982
title: "menus.hstabs",
90-
showLink: true,
9183
i18n: true
9284
}
9385
},

package.json

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "vue-pure-admin",
3-
"version": "2.8.5",
3+
"version": "2.9.0",
44
"private": true,
55
"engines": {
66
"node": ">= 16",
@@ -10,6 +10,7 @@
1010
"dev": "cross-env --max_old_space_size=4096 vite",
1111
"serve": "pnpm dev",
1212
"build": "rimraf dist && cross-env vite build",
13+
"report": "rimraf dist && cross-env vite build",
1314
"preview": "vite preview",
1415
"preview:build": "pnpm build && vite preview",
1516
"clean:cache": "rm -rf node_modules && rm -rf .eslintcache && pnpm install",
@@ -30,14 +31,11 @@
3031
"dependencies": {
3132
"@amap/amap-jsapi-loader": "^1.0.1",
3233
"@ctrl/tinycolor": "^3.4.0",
33-
"@fortawesome/fontawesome-svg-core": "^1.2.36",
34-
"@fortawesome/free-solid-svg-icons": "^5.15.4",
35-
"@fortawesome/vue-fontawesome": "^3.0.0-5",
3634
"@logicflow/core": "0.7.1",
3735
"@logicflow/extension": "0.7.1",
38-
"@vueuse/core": "^7.5.3",
36+
"@vueuse/core": "^7.5.5",
3937
"@vueuse/motion": "^2.0.0-beta.9",
40-
"@vueuse/shared": "^7.5.3",
38+
"@vueuse/shared": "^7.5.5",
4139
"animate.css": "^4.1.1",
4240
"axios": "^0.25.0",
4341
"cropperjs": "^1.5.11",
@@ -47,22 +45,20 @@
4745
"echarts": "^5.2.1",
4846
"element-plus": "1.3.0-beta.1",
4947
"element-resize-detector": "^1.2.3",
50-
"font-awesome": "^4.7.0",
5148
"js-cookie": "^3.0.1",
5249
"lodash-es": "^4.17.21",
5350
"mitt": "^3.0.0",
5451
"mockjs": "^1.1.0",
5552
"nprogress": "^0.2.0",
5653
"path": "^0.12.7",
57-
"pinia": "^2.0.9",
54+
"pinia": "^2.0.11",
5855
"qs": "^6.10.1",
59-
"remixicon": "^2.5.0",
6056
"resize-observer-polyfill": "^1.5.1",
6157
"responsive-storage": "^1.0.11",
6258
"rgb-hex": "^4.0.0",
6359
"v-contextmenu": "3.0.0",
64-
"vue": "^3.2.27",
65-
"vue-i18n": "^9.2.0-beta.26",
60+
"vue": "^3.2.29",
61+
"vue-i18n": "^9.2.0-beta.30",
6662
"vue-json-pretty": "^2.0.2",
6763
"vue-router": "^4.0.12",
6864
"vue-types": "^4.1.1",
@@ -76,7 +72,10 @@
7672
"@commitlint/cli": "13.1.0",
7773
"@commitlint/config-conventional": "13.1.0",
7874
"@iconify-icons/ep": "^1.1.3",
79-
"@iconify/vue": "^3.1.2",
75+
"@iconify-icons/fa": "^1.1.1",
76+
"@iconify-icons/fa-solid": "^1.1.2",
77+
"@iconify-icons/ri": "^1.1.1",
78+
"@iconify/vue": "^3.1.3",
8079
"@types/element-resize-detector": "1.1.3",
8180
"@types/js-cookie": "^3.0.1",
8281
"@types/mockjs": "1.0.3",
@@ -86,12 +85,12 @@
8685
"@typescript-eslint/eslint-plugin": "4.31.0",
8786
"@typescript-eslint/parser": "4.31.0",
8887
"@vitejs/plugin-legacy": "^1.6.4",
89-
"@vitejs/plugin-vue": "^2.0.1",
88+
"@vitejs/plugin-vue": "^2.1.0",
9089
"@vitejs/plugin-vue-jsx": "^1.3.3",
9190
"@vue/eslint-config-prettier": "6.0.0",
9291
"@vue/eslint-config-typescript": "7.0.0",
9392
"@zougt/vite-plugin-theme-preprocessor": "^1.4.4",
94-
"autoprefixer": "10.2.4",
93+
"autoprefixer": "^10.4.2",
9594
"cross-env": "7.0.3",
9695
"eslint": "7.30.0",
9796
"eslint-plugin-prettier": "3.4.0",
@@ -103,8 +102,9 @@
103102
"prettier": "2.3.2",
104103
"pretty-quick": "3.1.1",
105104
"rimraf": "3.0.2",
106-
"sass": "^1.45.0",
107-
"sass-loader": "^12.3.0",
105+
"rollup-plugin-visualizer": "^5.5.4",
106+
"sass": "^1.49.7",
107+
"sass-loader": "^12.4.0",
108108
"stylelint": "13.13.1",
109109
"stylelint-config-prettier": "8.0.2",
110110
"stylelint-config-standard": "22.0.0",

0 commit comments

Comments
 (0)