Przeglądaj źródła

Switch: fix click event triggering twice (#9760)

杨奕 7 lat temu
rodzic
commit
472b72423e
1 zmienionych plików z 1 dodań i 1 usunięć
  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 {