mirror of
https://github.com/vbenjs/vue-vben-admin.git
synced 2025-08-28 05:39:34 +08:00
refactor(hooks): introduce vueuse, delete duplicate hooks
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
import { setCssVar } from '/@/hooks/web/useCssVar';
|
||||
import { isHexColor, colorIsDark, lighten, darken } from '/@/utils/color';
|
||||
import { appStore } from '/@/store/modules/app';
|
||||
import { MenuThemeEnum } from '/@/enums/menuEnum';
|
||||
@@ -12,6 +11,10 @@ const SIDER_DARK_DARKEN_BG_COLOR = '--sider-dark-darken-bg-color';
|
||||
const SIDER_LIGHTEN_1_BG_COLOR = '--sider-dark-lighten-1-bg-color';
|
||||
const SIDER_LIGHTEN_2_BG_COLOR = '--sider-dark-lighten-2-bg-color';
|
||||
|
||||
export function setCssVar(prop: string, val: any, dom = document.documentElement) {
|
||||
dom.style.setProperty(prop, val);
|
||||
}
|
||||
|
||||
function toggleClass(flag: boolean, clsName: string) {
|
||||
const body = document.body;
|
||||
let { className } = body;
|
||||
|
Reference in New Issue
Block a user