fix: nativeEvent is not a complete Event object (#1811)
* fix: nativeEvent is not a complete Event object The Spread syntax is only get own property of a Object,but many properties of Event is on it's prototypes chains, so the result is that the passed nativeEvent only has two property: isTrutsed and shiftKey * fix semicolonpull/1835/head
parent
a47b2bfc6e
commit
f564f6d0dc
|
@ -77,6 +77,7 @@ export default {
|
||||||
this.sChecked = e.target.checked;
|
this.sChecked = e.target.checked;
|
||||||
}
|
}
|
||||||
this.$forceUpdate(); // change前,维持现有状态
|
this.$forceUpdate(); // change前,维持现有状态
|
||||||
|
e.shiftKey = this.eventShiftKey;
|
||||||
this.__emit('change', {
|
this.__emit('change', {
|
||||||
target: {
|
target: {
|
||||||
...props,
|
...props,
|
||||||
|
@ -88,7 +89,7 @@ export default {
|
||||||
preventDefault() {
|
preventDefault() {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
},
|
},
|
||||||
nativeEvent: { ...e, shiftKey: this.eventShiftKey },
|
nativeEvent: e,
|
||||||
});
|
});
|
||||||
this.eventShiftKey = false;
|
this.eventShiftKey = false;
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue