refactor: 将lodash以及相关库从平台中移除

This commit is contained in:
xiaoxian521
2022-12-13 11:42:06 +08:00
parent 60e33f3782
commit 2338dcab1f
12 changed files with 497 additions and 506 deletions

View File

@@ -1,6 +1,5 @@
import { ref } from "vue";
import { getConfig } from "@/config";
import { find } from "lodash-unified";
import { useLayout } from "./useLayout";
import { themeColorsType } from "../types";
import { useGlobal } from "@pureadmin/utils";
@@ -55,7 +54,7 @@ export function useDataThemeChange() {
if (theme === "default" || theme === "light") {
setEpThemeColor(getConfig().EpThemeColor);
} else {
const colors = find(themeColors.value, { themeColor: theme });
const colors = themeColors.value.find(v => v.themeColor === theme);
setEpThemeColor(colors.color);
}
}