瀏覽代碼

[feat]橡皮样式

byq 1 周之前
父節點
當前提交
0029394698
共有 1 個文件被更改,包括 27 次插入3 次删除
  1. 27 3
      src/views/xjc-integratedmachine/wakeup/rainbow/index.vue

+ 27 - 3
src/views/xjc-integratedmachine/wakeup/rainbow/index.vue

@@ -7,10 +7,12 @@
                     <FollowRingChart id="ring-chart1" class="ring-chart1" :chartProps="chartPrpps1"/>
                 </div>
             </div>
+
             <div id="eraser"
                  @click="edit"
-                 style="position: absolute;top:10px;text-align:center;line-height:50px;left:10px;width: 50px;height: 50px;background: #FFFFFF;border-radius: 50%">
-                橡皮
+                 :class="[chartPrpps1.status == 'edit'?'bg-color-style':'bg-color-style1']"
+                >
+                 橡皮
             </div>
             <div id="save"
                  @click="save"
@@ -101,7 +103,11 @@
         status.value = 'save'
     }
     function edit() {
+      if(chartPrpps1.value.status == 'edit'){
+        chartPrpps1.value.status = 'new'
+      }else {
         chartPrpps1.value.status = 'edit'
+      }
     }
 
 </script>
@@ -329,5 +335,23 @@
             //background: #ffff00;
         }
     }
-
+    .bg-color-style{
+      color:black;
+      background: #ffff00;
+    }
+    #eraser{
+     position: absolute;
+     top:10px;
+     text-align:center;
+     line-height:50px;
+     left:10px;
+     width: 50px;
+     height: 50px;
+     //background: #FFFFFF;
+      border:1px solid #00afff;
+     border-radius: 50%
+    }
+    .bg-color-style1{
+      background: #FFFFFF;
+    }
 </style>