feat: update vc-switch to 1.9.0
parent
015fca4e1b
commit
a04d8a56f4
|
@ -51,10 +51,10 @@ export default {
|
||||||
}
|
}
|
||||||
this.$emit('change', checked);
|
this.$emit('change', checked);
|
||||||
},
|
},
|
||||||
toggle() {
|
handleClick(e) {
|
||||||
const checked = !this.stateChecked;
|
const checked = !this.stateChecked;
|
||||||
this.setChecked(checked);
|
this.setChecked(checked, e);
|
||||||
this.$emit('click', checked);
|
this.$emit('click', checked, e);
|
||||||
},
|
},
|
||||||
handleKeyDown(e) {
|
handleKeyDown(e) {
|
||||||
if (e.keyCode === 37) {
|
if (e.keyCode === 37) {
|
||||||
|
@ -91,7 +91,7 @@ export default {
|
||||||
on: {
|
on: {
|
||||||
...this.$listeners,
|
...this.$listeners,
|
||||||
keydown: this.handleKeyDown,
|
keydown: this.handleKeyDown,
|
||||||
click: this.toggle,
|
click: this.handleClick,
|
||||||
mouseup: this.handleMouseUp,
|
mouseup: this.handleMouseUp,
|
||||||
},
|
},
|
||||||
attrs: {
|
attrs: {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
// base rc-switch 1.8.0
|
// base rc-switch 1.9.0
|
||||||
import Switch from './Switch';
|
import Switch from './Switch';
|
||||||
|
|
||||||
export default Switch;
|
export default Switch;
|
||||||
|
|
Loading…
Reference in New Issue