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

fix:窗帘的到计时问题处理

chenzhen2 1 год назад
Родитель
Сommit
7bbdee2228

+ 9 - 8
src/views/envmonitor/components/Curtain/CurtainOpening.vue

@@ -52,10 +52,10 @@
       </div>
 
       <!--暂停-->
+      <!-- :class="activeIndex == 3 ? 'control-item-active' : ''" -->
       <div
-        class="control-item"
+        class="control-item control-stop"
         @click="openCurtainMain(3)"
-        :class="activeIndex == 3 ? 'control-item-active' : ''"
       >
         <img
           class="curtain-stop-icon"
@@ -414,12 +414,7 @@ export default defineComponent({
         height: 24px;
         transform: translate(-50%, -50%);
       }
-      &:active {
-        background: rgba(206, 159, 39, 0.4);
-      }
-      // &:hover {
-      //   background: rgba(206, 159, 39, 0.4);
-      // }
+
       .title {
         position: absolute;
         font-family: "PingFang SC";
@@ -433,6 +428,12 @@ export default defineComponent({
       }
     }
 
+    .control-stop {
+      &:active {
+        background: rgba(206, 159, 39, 0.4);
+      }
+    }
+
     .control-item-active {
       // position: relative;
       background: rgba(206, 159, 39, 0.4);

+ 8 - 5
src/views/envmonitor/components/Curtain/index.vue

@@ -162,10 +162,10 @@
           </div>
 
           <!--暂停-->
+          <!-- :class="item.activeIndex == 3 ? 'control-item-active' : ''" -->
           <div
-            class="control-item"
+            class="control-item control-stop"
             @click="openCurtainClid(item, 3)"
-            :class="item.activeIndex == 3 ? 'control-item-active' : ''"
             v-if="item.stopSet"
           >
             <img
@@ -527,9 +527,7 @@ export default defineComponent({
     height: 40px;
     background: #f1f4f6;
     border-radius: 50%;
-    &:active {
-      background: rgba(206, 159, 39, 0.4);
-    }
+
     // &:hover {
     //   background: rgba(206, 159, 39, 0.4);
     // }
@@ -546,6 +544,11 @@ export default defineComponent({
       height: 20px;
     }
   }
+  .control-stop {
+    &:active {
+      background: rgba(206, 159, 39, 0.4);
+    }
+  }
 
   .control-item-active {
     background: rgba(206, 159, 39, 0.4);