Parcourir la source

Switch: Label with el-switch repeating event(fix #14959) (#15178)

lisheng il y a 6 ans
Parent
commit
208a78786f
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  1. 1 1
      packages/switch/src/component.vue

+ 1 - 1
packages/switch/src/component.vue

@@ -5,7 +5,7 @@
     role="switch"
     :aria-checked="checked"
     :aria-disabled="switchDisabled"
-    @click="switchValue"
+    @click.prevent="switchValue"
   >
     <input
       class="el-switch__input"