Browse Source

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

lisheng 6 years ago
parent
commit
208a78786f
1 changed files with 1 additions and 1 deletions
  1. 1 1
      packages/switch/src/component.vue

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

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