Pārlūkot izejas kodu

主题色切换按钮样式

任一存 2 gadi atpakaļ
vecāks
revīzija
b04710cc98
1 mainītis faili ar 16 papildinājumiem un 7 dzēšanām
  1. 16 7
      src/views/RelicDetail.vue

+ 16 - 7
src/views/RelicDetail.vue

@@ -116,8 +116,6 @@
 import { Moon, Sunny } from '@element-plus/icons-vue'
 import { mapMutations, mapState } from 'vuex'
 import HelpComp from "@/components/HelpComp.vue"
-import dayTimePic from "@/assets/images/day-time.png"
-import nightTimePic from "@/assets/images/night-time.png"
 
 export default {
   components: {
@@ -128,8 +126,6 @@ export default {
       isShowDescDetail: false,
       isShowLogo: true,
       isShowHelp: false,
-      dayTimePic,
-      nightTimePic,
     }
   },
   computed: {
@@ -303,14 +299,27 @@ export default {
   --el-switch-on-color: transparent;
   --el-switch-off-color: transparent;
   --el-switch-border-color: #a3a2a2;
+
   .el-switch--large.is-checked .el-switch__core .el-switch__inner {
-    padding: 0 0px 0 28px;
+    padding: 0 0px 0 28px !important;
   }
   .el-switch--large .el-switch__core .el-switch__inner {
-    padding: 0 28px 0 0;
+    padding: 0 27px 0 1px !important;
   }
-  .el-switch__core .el-switch__action {
+
+  .el-switch .el-switch__core .el-switch__action {
     z-index: -1;
+    background-color: #000 !important;
+  }
+  .el-switch.is-checked .el-switch__core .el-switch__action {
+    background-color: #fff !important;
+  }
+
+  .el-switch .el-switch__core .el-switch__inner .is-icon {
+    color: #fff !important;
+  }
+  .el-switch.is-checked .el-switch__core .el-switch__inner .is-icon {
+    color: #000 !important;
   }
 }
 </style>