feat: 黑暗模式

This commit is contained in:
wang_fan_w 2024-05-02 11:18:36 +08:00
parent 08a75a10e3
commit 114f1f3942
4 changed files with 5 additions and 4 deletions

View File

@ -141,7 +141,6 @@ const onNightMode = () => {
//
document.body.removeAttribute("arco-theme");
}
console.log("黑暗模式", darkMode.value);
};
//

View File

@ -29,6 +29,7 @@ const { cacheRoutes } = storeToRefs(routerStore);
<style lang="scss" scoped>
.content {
height: calc(100vh - 60px - 30px); // -footer
background: $color-bg-3; //
}
.scrollbar {
height: calc(100% - 40px);

View File

@ -50,6 +50,8 @@ $color-bg-1: var(--color-bg-1); // 整体背景色
$color-bg-2: var(--color-bg-2); // 一级容器背景
$color-bg-3: var(--color-bg-3); // 二级容器背景
$color-bg-4: var(--color-bg-4); // 三级容器背景
$color-bg-5: var(--color-bg-5); // 下拉弹出框Tooltip 背景颜色
$color-bg-white: var(--color-bg-white); // 白色背景
// 阴影
$shadow-special: 0 0 1px rgba(0, 0, 0, 0.3); // 特殊阴影

View File

@ -27,7 +27,6 @@ html {
// 设置全局颜色-关联黑暗模式
body {
background-color: var(--color-bg-1);
color: var(--color-text-1);
// color-scheme: dark; // 这个属性设置后滚动条也能表现为暗色模式
background: $color-bg-2; // body背景颜色
color: var(--color-text-1); // 整体文字的颜色
}