|
|
|
@ -69,11 +69,6 @@ export default defineComponent({
|
|
|
|
|
if (!('checked' in props)) {
|
|
|
|
|
this.sChecked = e.target.checked;
|
|
|
|
|
}
|
|
|
|
|
// fix https://github.com/vueComponent/ant-design-vue/issues/3047
|
|
|
|
|
if ('checked' in props) {
|
|
|
|
|
this.$refs.input.checked = props.checked;
|
|
|
|
|
}
|
|
|
|
|
this.$forceUpdate(); // change前,维持现有状态
|
|
|
|
|
e.shiftKey = this.eventShiftKey;
|
|
|
|
|
const eventObj = {
|
|
|
|
|
target: {
|
|
|
|
@ -88,6 +83,12 @@ export default defineComponent({
|
|
|
|
|
},
|
|
|
|
|
nativeEvent: e,
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
// fix https://github.com/vueComponent/ant-design-vue/issues/3047
|
|
|
|
|
// 受控模式下维持现有状态
|
|
|
|
|
if ('checked' in props) {
|
|
|
|
|
this.$refs.input.checked = props.checked;
|
|
|
|
|
}
|
|
|
|
|
this.__emit('update:checked', eventObj);
|
|
|
|
|
this.__emit('change', eventObj);
|
|
|
|
|
this.eventShiftKey = false;
|
|
|
|
|