Преглед на файлове

深色模式,还在适配中,不要发版

ZaiZai преди 1 година
родител
ревизия
937611e19d
променени са 3 файла, в които са добавени 103 реда и са изтрити 2 реда
  1. 1 1
      src/config/index.json
  2. 45 0
      src/layout/index.scss
  3. 57 1
      src/styles/app/theme.scss

+ 1 - 1
src/config/index.json

@@ -1,6 +1,6 @@
 {
     "version": "20230607160059",
-    "target": "http://127.0.0.1:8090",
+    "target": "http://192.168.0.109:8090",
     "smsPhone": "",
     "vite": {
         "port": 5174,

+ 45 - 0
src/layout/index.scss

@@ -455,3 +455,48 @@
     color: white;
     background-color: var(--el-color-primary-dark-2);
 }
+
+//深色模式
+html.dark {
+    .hc-layout-box .hc-layout-header {
+        background: #181818;
+    }
+    .hc-layout-box .hc-layout-container .hc-layout-aside {
+        background: #181818;
+        .el-menu {
+            --el-menu-text-color: hsla(0,0%,100%,0.7) !important;
+            --el-menu-active-color: #ffffff;
+            .el-menu-item.is-active::after {
+                display: none;
+            }
+        }
+    }
+    .user-info-bar::before {
+        border-color: #464646;
+    }
+    .hc-layout-box .hc-layout-container .hc-layout-main .hc-router-menu-bar {
+        background: #343434;
+        .hc-router-tab-item {
+            .close-icon:hover {
+                color: white;
+            }
+            &:hover:not([class*='cur']) {
+                color: white;
+            }
+            &.cur {
+                color: white;
+            }
+            &.cur::after {
+                background: white;
+            }
+        }
+    }
+    .hc-header-top-menu-bar .item,
+    .hc-layout-box .hc-layout-header .header-content-bar .header-icon-bar,
+    .user-info-bar .user-name, .user-info-bar .arrow-icon {
+        color: hsla(0, 0%, 100%, 0.8);
+    }
+    .hc-header-top-menu-bar .item.cur {
+        color: white;
+    }
+}

+ 57 - 1
src/styles/app/theme.scss

@@ -17,6 +17,62 @@ html.dark {
     --hc-label-color: #5A6382;
     --hc-shadow: 4px 4px 8px 0 rgba(0,0,0,0.15), -4px -4px 8px 0 #3d3d3d;
     html, body, #app {
-        //background: var(--el-bg-color-overlay);
+        background: #000000;
+        color: hsla(0,0%,100%,0.8);
+    }
+    .hc-layout-box .hc-layout-left-box {
+        background: #181818 !important;
+        color: hsla(0,0%,100%,0.8) !important;
+    }
+    .hc-layout-box .hc-layout-left-box .hc-project-box,
+    .hc-layout-box .hc-layout-left-box .hc-tree-foot-tip-box {
+        border-color: hsla(0,0%,100%,0.2);
+    }
+    .hc-layout-box .hc-layout-left-box .hc-project-box .hc-project-icon-box {
+        color: white;
+    }
+    .hc-layout-box .hc-layout-left-box .hc-project-box .project-name-box .project-alias {
+        color: white;
+    }
+    .hc-layout-box .hc-layout-left-box .hc-tree-foot-tip-box .dot-view.black:before {
+        border: 1px solid #3e3d3d;
+    }
+    .data-custom-tree-node .menu-icon1 {
+        background: hsla(0,0%,100%,0.46);
+    }
+    //右键菜单
+    .hc-context-menu-box {
+        background-color: #4A4A4A;
+    }
+    .hc-context-menu-box .hc-context-menu-item {
+        color: #E3E3E3;
+        &:hover {
+            background-color: #616161;
+        }
+    }
+    //新卡片
+    .el-card.hc-new-card-box {
+        background: #181818;
+        --el-card-bg-color: #181818;
+        --el-text-color-primary: hsla(0, 0%, 100%, 0.8);
+    }
+    .el-card.hc-tab-card-box .hc-card-header-box {
+        border-color: hsla(0, 0%, 100%, 0.2);
+    }
+    .el-card.hc-tab-card-box .tab-card-header-tabs .item {
+        border-color: hsla(0, 0%, 100%, 0.2);
+    }
+    .el-card.hc-tab-card-box .tab-card-header-tabs {
+        .item + .item {
+            border-left: 0;
+        }
+    }
+    .el-card.hc-tab-card-box .tab-card-header-tabs .item.cur {
+        background: #181818;
+        border-color: hsla(0, 0%, 100%, 0.2);
+        color: hsla(0, 0%, 100%, 0.8);
+    }
+    .el-card.hc-tab-card-box .tab-card-header-tabs .item.cur:after {
+        background: #181818;
     }
 }