浏览代码

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 {