Browse Source

默认配置

CzRger 7 months ago
parent
commit
30201badac
2 changed files with 6 additions and 9 deletions
  1. 5 8
      src/router/index.ts
  2. 1 1
      src/style/cus.scss

+ 5 - 8
src/router/index.ts

@@ -67,18 +67,15 @@ export const initMainRouter = async () => {
         //     }
         //     loading.close()
         //     themeConfig = config.data
-        //     initRootVar(config.data)
+        //     initRootVar(themeConfig)
         // })
-        initRootVar({
-            mainColor: '#f82828',
-            textColor1: 'rgba(48,49,51,1)',
-            textColor2: 'rgba(96,98,102,1)',
-            textColor3: 'rgba(144,147,153,1)',
-            textColor4: 'rgba(192,196,204,1)',
+        themeConfig = {
+            mainColor: '#2E81FF',
             logo: 'https://element-plus.org/images/element-plus-logo.svg',
             title: '海南社管智慧搜索平台',
             subTitle: 'HAI NAN SHE GUAN ZHI HUI SOU SUO PING TAI'
-        })
+        }
+        initRootVar(themeConfig)
     } else if (location.pathname !== '/login') {
         toLogin()
     }

+ 1 - 1
src/style/cus.scss

@@ -6,7 +6,7 @@
   --cus-text-color-4: #C0C4CC;
   --el-color-primary: var(--cus-main-color) !important;
   // 主题自定义
-  --cus-main-color: rgba(46, 129, 255, 0.2);
+  --cus-main-color: #2E81FF;
   --cus-main-color-rgb: 46, 129, 255;
   --cus-table-head-bg-color: #273A58;
 }