Selaa lähdekoodia

Switch: fix click event triggering twice (#9760)

杨奕 7 vuotta sitten
vanhempi
commit
472b72423e
1 muutettua tiedostoa jossa 1 lisäystä ja 1 poistoa
  1. 1 1
      packages/switch/src/component.vue

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

@@ -136,7 +136,7 @@
         this.$refs.core.style.backgroundColor = newColor;
       },
       switchValue() {
-        this.$refs.input.click();
+        !this.switchDisabled && this.handleChange();
       },
       getMigratingConfig() {
         return {