Просмотр исходного кода

refactor(theme, camera, machine, live-stream): update color variables and improve component formatting

- Updated primary color variables in SCSS and TypeScript files for consistency across the theme.
- Enhanced formatting in camera, machine, and live-stream components by consolidating attributes and reducing unnecessary line breaks for improved readability.
- Ensured consistent usage of component properties to enhance maintainability across the application.
yb 6 дней назад
Родитель
Сommit
21018d73db

+ 5 - 5
src/assets/styles/theme/css-variables.scss

@@ -5,11 +5,11 @@
 :root {
   // ========== 主题色(默认 Indigo)==========
   --color-primary: #409eff;
-  --color-primary-light-3: #818cf8;
-  --color-primary-light-5: #a5b4fc;
-  --color-primary-light-7: #c7d2fe;
-  --color-primary-light-9: #e0e7ff;
-  --color-primary-dark-2: #4f46e5;
+  --color-primary-light-3: #79bbff;
+  --color-primary-light-5: #a0cfff;
+  --color-primary-light-7: #c8e3ff;
+  --color-primary-light-9: #ecf5ff;
+  --color-primary-dark-2: #337ecc;
 
   // 语义色
   --color-success: #10b981;

+ 5 - 5
src/assets/styles/theme/presets.ts

@@ -16,11 +16,11 @@ export const themeColorPresets: Record<string, ThemeColorSet> = {
   indigo: {
     name: '靛蓝',
     primary: '#409EFF',
-    primaryLight3: '#818cf8',
-    primaryLight5: '#a5b4fc',
-    primaryLight7: '#c7d2fe',
-    primaryLight9: '#e0e7ff',
-    primaryDark2: '#4f46e5'
+    primaryLight3: '#79bbff',
+    primaryLight5: '#a0cfff',
+    primaryLight7: '#c8e3ff',
+    primaryLight9: '#ecf5ff',
+    primaryDark2: '#337ecc'
   },
   violet: {
     name: '紫罗兰',

+ 0 - 17
src/views/camera/index.vue

@@ -754,22 +754,5 @@ onMounted(() => {
     border-top: 1px solid #e5e7eb;
     padding-top: 16px;
   }
-
-  .el-button--primary {
-    background-color: #4f46e5;
-    border-color: #4f46e5;
-
-    &:hover,
-    &:focus {
-      background-color: #6366f1;
-      border-color: #6366f1;
-    }
-  }
-
-  // Switch Indigo 主题
-  .el-switch.is-checked .el-switch__core {
-    background-color: #4f46e5;
-    border-color: #4f46e5;
-  }
 }
 </style>

+ 0 - 11
src/views/live-stream/index.vue

@@ -1230,17 +1230,6 @@ onMounted(async () => {
   padding: 12px 20px;
   border-top: 1px solid #e5e7eb;
   gap: 12px;
-
-  .el-button--primary {
-    background-color: #4f46e5;
-    border-color: #4f46e5;
-
-    &:hover,
-    &:focus {
-      background-color: #6366f1;
-      border-color: #6366f1;
-    }
-  }
 }
 
 // 流媒体播放抽屉样式

+ 0 - 17
src/views/machine/index.vue

@@ -645,22 +645,5 @@ onMounted(() => {
     border-top: 1px solid #e5e7eb;
     padding-top: 16px;
   }
-
-  .el-button--primary {
-    background-color: #4f46e5;
-    border-color: #4f46e5;
-
-    &:hover,
-    &:focus {
-      background-color: #6366f1;
-      border-color: #6366f1;
-    }
-  }
-
-  // Switch Indigo 主题
-  .el-switch.is-checked .el-switch__core {
-    background-color: #4f46e5;
-    border-color: #4f46e5;
-  }
 }
 </style>