From a04d8a56f4711419c2cdcbed42b5b858a24cf772 Mon Sep 17 00:00:00 2001 From: wangxueliang Date: Sat, 2 Mar 2019 11:21:00 +0800 Subject: [PATCH] feat: update vc-switch to 1.9.0 --- components/vc-switch/Switch.jsx | 8 ++++---- components/vc-switch/index.js | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/components/vc-switch/Switch.jsx b/components/vc-switch/Switch.jsx index 4ec1b4ca9..719a11165 100644 --- a/components/vc-switch/Switch.jsx +++ b/components/vc-switch/Switch.jsx @@ -51,10 +51,10 @@ export default { } this.$emit('change', checked); }, - toggle() { + handleClick(e) { const checked = !this.stateChecked; - this.setChecked(checked); - this.$emit('click', checked); + this.setChecked(checked, e); + this.$emit('click', checked, e); }, handleKeyDown(e) { if (e.keyCode === 37) { @@ -91,7 +91,7 @@ export default { on: { ...this.$listeners, keydown: this.handleKeyDown, - click: this.toggle, + click: this.handleClick, mouseup: this.handleMouseUp, }, attrs: { diff --git a/components/vc-switch/index.js b/components/vc-switch/index.js index f4e73763b..bfde65dd6 100644 --- a/components/vc-switch/index.js +++ b/components/vc-switch/index.js @@ -1,4 +1,4 @@ -// base rc-switch 1.8.0 +// base rc-switch 1.9.0 import Switch from './Switch'; export default Switch;