Skip to content

Commit

Permalink
perf: 升级依赖版本
Browse files Browse the repository at this point in the history
  • Loading branch information
greper committed Mar 17, 2024
1 parent c73b698 commit 44539b4
Show file tree
Hide file tree
Showing 5 changed files with 88 additions and 94 deletions.
140 changes: 70 additions & 70 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,97 +22,97 @@
"author": "Greper",
"license": "MIT",
"dependencies": {
"@ant-design/colors": "^7.0.0",
"@ant-design/icons-vue": "^6.1.0",
"@aws-sdk/client-s3": "^3.383.0",
"@aws-sdk/s3-request-presigner": "^3.383.0",
"@fast-crud/fast-crud": "^1.20.1",
"@fast-crud/fast-extends": "^1.20.1",
"@fast-crud/ui-antdv4": "^1.20.1",
"@fast-crud/ui-interface": "^1.20.1",
"@ant-design/colors": "^7.0.2",
"@ant-design/icons-vue": "^7.0.1",
"@aws-sdk/client-s3": "^3.535.0",
"@aws-sdk/s3-request-presigner": "^3.535.0",
"@fast-crud/fast-crud": "workspace:^1.20.1",
"@fast-crud/fast-extends": "workspace:^1.20.1",
"@fast-crud/ui-antdv4": "workspace:^1.20.1",
"@fast-crud/ui-interface": "workspace:^1.20.1",
"@iconify/vue": "^4.1.1",
"@soerenmartius/vue3-clipboard": "^0.1.2",
"ant-design-vue": "^4.0.0",
"axios": "^1.4.0",
"axios-mock-adapter": "^1.21.5",
"ant-design-vue": "^4.1.2",
"axios": "^1.6.8",
"axios-mock-adapter": "^1.22.0",
"base64-js": "^1.5.1",
"better-scroll": "^2.5.1",
"china-division": "^2.6.1",
"core-js": "^3.32.0",
"cos-js-sdk-v5": "^1.4.19",
"cropperjs": "^1.5.13",
"dayjs": "^1.11.9",
"highlight.js": "^11.8.0",
"china-division": "^2.7.0",
"core-js": "^3.36.0",
"cos-js-sdk-v5": "^1.7.0",
"cropperjs": "^1.6.1",
"dayjs": "^1.11.10",
"highlight.js": "^11.9.0",
"lodash-es": "^4.17.21",
"mitt": "^3.0.1",
"nprogress": "^0.2.0",
"object-assign": "^4.1.1",
"pinia": "2.1.6",
"qiniu-js": "^3.4.1",
"sortablejs": "^1.15.0",
"vue": "^3.3.4",
"pinia": "2.1.7",
"qiniu-js": "^3.4.2",
"sortablejs": "^1.15.2",
"vue": "^3.4.21",
"vue-cropperjs": "^5.0.0",
"vue-i18n": "^9.2.2",
"vue-router": "^4.2.4",
"vue-i18n": "^9.10.2",
"vue-router": "^4.3.0",
"vuedraggable": "^2.24.3"
},
"devDependencies": {
"@rollup/plugin-commonjs": "^25.0.3",
"@rollup/plugin-node-resolve": "^15.1.0",
"@types/chai": "^4.3.5",
"@types/lodash-es": "^4.17.8",
"@types/mocha": "^10.0.1",
"@types/node": "^20.4.7",
"@types/nprogress": "^0.2.0",
"@typescript-eslint/eslint-plugin": "^6.2.1",
"@typescript-eslint/parser": "^6.2.1",
"@vitejs/plugin-legacy": "^4.1.1",
"@vitejs/plugin-vue": "^4.2.3",
"@vitejs/plugin-vue-jsx": "^3.0.1",
"@vue/compiler-sfc": "^3.3.4",
"@vue/eslint-config-typescript": "^11.0.3",
"@vue/test-utils": "^2.4.1",
"autoprefixer": "^10.4.14",
"@rollup/plugin-commonjs": "^25.0.7",
"@rollup/plugin-node-resolve": "^15.2.3",
"@types/chai": "^4.3.12",
"@types/lodash-es": "^4.17.12",
"@types/mocha": "^10.0.6",
"@types/node": "^20.11.28",
"@types/nprogress": "^0.2.3",
"@typescript-eslint/eslint-plugin": "^7.2.0",
"@typescript-eslint/parser": "^7.2.0",
"@vitejs/plugin-legacy": "^5.3.2",
"@vitejs/plugin-vue": "^5.0.4",
"@vitejs/plugin-vue-jsx": "^3.1.0",
"@vue/compiler-sfc": "^3.4.21",
"@vue/eslint-config-typescript": "^13.0.0",
"@vue/test-utils": "^2.4.5",
"autoprefixer": "^10.4.18",
"caller-path": "^4.0.0",
"chai": "^4.3.7",
"dependency-cruiser": "^13.1.1",
"chai": "^5.1.0",
"dependency-cruiser": "^16.2.3",
"dot": "^1.1.3",
"eslint": "8.46.0",
"eslint-config-prettier": "^8.10.0",
"eslint-plugin-import": "^2.28.0",
"eslint": "8.57.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-prettier": "^5.0.0",
"eslint-plugin-prettier": "^5.1.3",
"eslint-plugin-promise": "^6.1.1",
"eslint-plugin-vue": "^9.16.1",
"esno": "^0.17.0",
"husky": "^8.0.3",
"less": "^4.1.3",
"less-loader": "^11.1.3",
"lint-staged": "^13.2.3",
"postcss": "^8.4.27",
"prettier": "3.0.1",
"pretty-quick": "^3.1.3",
"rimraf": "^5.0.1",
"rollup": "^3.27.2",
"rollup-plugin-visualizer": "^5.9.2",
"stylelint": "^15.10.2",
"eslint-plugin-vue": "^9.23.0",
"esno": "^4.7.0",
"husky": "^9.0.11",
"less": "^4.2.0",
"less-loader": "^12.2.0",
"lint-staged": "^15.2.2",
"postcss": "^8.4.35",
"prettier": "3.2.5",
"pretty-quick": "^4.0.0",
"rimraf": "^5.0.5",
"rollup": "^4.13.0",
"rollup-plugin-visualizer": "^5.12.0",
"stylelint": "^16.2.1",
"stylelint-config-prettier": "^9.0.5",
"stylelint-order": "^6.0.3",
"tailwindcss": "^3.3.3",
"terser": "^5.19.2",
"ts-node": "^10.9.1",
"typescript": "5.1.6",
"unplugin-vue-define-options": "^1.3.14",
"vite": "^4.4.8",
"stylelint-order": "^6.0.4",
"tailwindcss": "^3.4.1",
"terser": "^5.29.2",
"ts-node": "^10.9.2",
"typescript": "5.4.2",
"unplugin-vue-define-options": "^1.4.2",
"vite": "^5.1.6",
"vite-plugin-compression": "^0.5.1",
"vite-plugin-html": "^3.2.0",
"vite-plugin-html": "^3.2.2",
"vite-plugin-optimize-persist": "^0.1.2",
"vite-plugin-package-config": "^0.1.1",
"vite-plugin-purge-icons": "^0.9.2",
"vite-plugin-purge-icons": "^0.10.0",
"vite-plugin-theme": "^0.8.6",
"vite-plugin-windicss": "^1.9.0",
"vue-eslint-parser": "^9.3.1",
"vue-tsc": "^1.8.8",
"vite-plugin-windicss": "^1.9.3",
"vue-eslint-parser": "^9.4.2",
"vue-tsc": "^2.0.6",
"windicss": "^3.5.6"
},
"husky": {
Expand Down
1 change: 0 additions & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import i18n from "./i18n";
import store from "./store";
import components from "./components";
import plugin from "./plugin/";

// 正式项目请删除mock,避免影响性能
import "./mock";

Expand Down
35 changes: 14 additions & 21 deletions src/store/modules/settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,27 +3,7 @@ import { theme } from "ant-design-vue";
import _ from "lodash-es";
// @ts-ignore
import { LocalStorage } from "/src/utils/util.storage";
// import { replaceStyleVariables } from "vite-plugin-theme/es/client";

// import { getThemeColors, generateColors } from "/src/../build/theme-colors";
//
// import { mixLighten, mixDarken, tinycolor } from "vite-plugin-theme/es/colorUtils";

// export async function changeTheme(color?: string) {
// if (color == null) {
// return;
// }
// const colors = generateColors({
// mixDarken,
// mixLighten,
// tinycolor,
// color
// });
//
// return await replaceStyleVariables({
// colorVariables: [...getThemeColors(color), ...colors]
// });
// }
import less from "less";
export type ThemeToken = {
token: {
colorPrimary: string;
Expand Down Expand Up @@ -73,8 +53,21 @@ export const useSettingStore = defineStore({
this.themeConfig.mode = mode;
if (mode === "dark") {
this.themeToken.algorithm = theme.darkAlgorithm;
const defaultSeed = theme.defaultSeed;
const mapToken = theme.darkAlgorithm(defaultSeed);
less.modifyVars(mapToken);
less.modifyVars({
"@colorPrimaryBg": "#111a2c",
colorPrimaryBg: "#111a2c"
});
less.refreshStyles();
debugger;
} else {
this.themeToken.algorithm = theme.defaultAlgorithm;

const defaultSeed = theme.defaultSeed;
const mapToken = theme.defaultAlgorithm(defaultSeed);
less.modifyVars(mapToken);
}
this.persistThemeConfig();
},
Expand Down
2 changes: 2 additions & 0 deletions src/style/theme/index.less
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
@bg-menu-item-color:hsla(0,0%,100%,.5);
@colorPrimaryBg:#ebf1f6;
@primary-color: #1890ff;
4 changes: 2 additions & 2 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,8 @@ export default ({ command, mode }) => {
less: {
// 修改默认主题颜色,配置less变量
// modifyVars: generateModifyVars(),
javascriptEnabled: true,
modifyVars: mapToken
javascriptEnabled: true
// modifyVars: mapToken
}
}
},
Expand Down

0 comments on commit 44539b4

Please sign in to comment.