Преглед изворни кода

Switch: fix click event triggering twice (#9760)

杨奕 пре 7 година
родитељ
комит
472b72423e
1 измењених фајлова са 1 додато и 1 уклоњено
  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 {