Explorar o código

Switch: fix click event triggering twice (#9760)

杨奕 %!s(int64=7) %!d(string=hai) anos
pai
achega
472b72423e
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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 {