fix: update vue3.0.6 error

pull/3716/head
tanjinzhou 2021-02-25 15:37:09 +08:00
parent 483e177e13
commit 3967926110
3 changed files with 9 additions and 6 deletions

View File

@ -34,8 +34,12 @@ const CalendarMixin = {
},
data() {
this.onKeyDown = this.onKeyDown || noop;
this.onBlur = this.onBlur || noop;
if (this.onKeyDown === undefined) {
this.onKeyDown = noop;
}
if (this.onBlur === undefined) {
this.onBlur = noop;
}
const props = this.$props;
const sValue = props.value || props.defaultValue || getNowByCurrentStateValue();
return {

View File

@ -925,7 +925,7 @@ export default function generateSelector<
// We should give focus back to selector if clicked item is not focusable
if (popupElement && popupElement.contains(target as HTMLElement)) {
const timeoutId = setTimeout(() => {
const timeoutId = window.setTimeout(() => {
const index = activeTimeoutIds.indexOf(timeoutId);
if (index !== -1) {
activeTimeoutIds.splice(index, 1);

View File

@ -27,7 +27,6 @@ export default defineComponent({
canClick: PropTypes.looseBool,
},
data() {
this.calcStepOffsetWidth = debounce(this.calcStepOffsetWidth, 150);
return {
flexSupported: true,
lastStepOffsetWidth: 0,
@ -63,7 +62,7 @@ export default defineComponent({
this.__emit('change', next);
}
},
calcStepOffsetWidth() {
calcStepOffsetWidth: debounce(function() {
if (isFlexSupported()) {
return;
}
@ -87,7 +86,7 @@ export default defineComponent({
this.setState({ lastStepOffsetWidth: offsetWidth });
});
}
},
}, 150),
},
render() {
const {