Skip to content

Commit 3967926

Browse files
committed
fix: update vue3.0.6 error
1 parent 483e177 commit 3967926

File tree

3 files changed

+9
-6
lines changed

3 files changed

+9
-6
lines changed

components/vc-calendar/src/mixin/CalendarMixin.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,12 @@ const CalendarMixin = {
3434
},
3535

3636
data() {
37-
this.onKeyDown = this.onKeyDown || noop;
38-
this.onBlur = this.onBlur || noop;
37+
if (this.onKeyDown === undefined) {
38+
this.onKeyDown = noop;
39+
}
40+
if (this.onBlur === undefined) {
41+
this.onBlur = noop;
42+
}
3943
const props = this.$props;
4044
const sValue = props.value || props.defaultValue || getNowByCurrentStateValue();
4145
return {

components/vc-select/generate.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -925,7 +925,7 @@ export default function generateSelector<
925925

926926
// We should give focus back to selector if clicked item is not focusable
927927
if (popupElement && popupElement.contains(target as HTMLElement)) {
928-
const timeoutId = setTimeout(() => {
928+
const timeoutId = window.setTimeout(() => {
929929
const index = activeTimeoutIds.indexOf(timeoutId);
930930
if (index !== -1) {
931931
activeTimeoutIds.splice(index, 1);

components/vc-steps/Steps.jsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ export default defineComponent({
2727
canClick: PropTypes.looseBool,
2828
},
2929
data() {
30-
this.calcStepOffsetWidth = debounce(this.calcStepOffsetWidth, 150);
3130
return {
3231
flexSupported: true,
3332
lastStepOffsetWidth: 0,
@@ -63,7 +62,7 @@ export default defineComponent({
6362
this.__emit('change', next);
6463
}
6564
},
66-
calcStepOffsetWidth() {
65+
calcStepOffsetWidth: debounce(function() {
6766
if (isFlexSupported()) {
6867
return;
6968
}
@@ -87,7 +86,7 @@ export default defineComponent({
8786
this.setState({ lastStepOffsetWidth: offsetWidth });
8887
});
8988
}
90-
},
89+
}, 150),
9190
},
9291
render() {
9392
const {

0 commit comments

Comments
 (0)