File tree Expand file tree Collapse file tree 3 files changed +9
-6
lines changed Expand file tree Collapse file tree 3 files changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -34,8 +34,12 @@ const CalendarMixin = {
34
34
} ,
35
35
36
36
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
+ }
39
43
const props = this . $props ;
40
44
const sValue = props . value || props . defaultValue || getNowByCurrentStateValue ( ) ;
41
45
return {
Original file line number Diff line number Diff line change @@ -925,7 +925,7 @@ export default function generateSelector<
925
925
926
926
// We should give focus back to selector if clicked item is not focusable
927
927
if ( popupElement && popupElement . contains ( target as HTMLElement ) ) {
928
- const timeoutId = setTimeout ( ( ) => {
928
+ const timeoutId = window . setTimeout ( ( ) => {
929
929
const index = activeTimeoutIds . indexOf ( timeoutId ) ;
930
930
if ( index !== - 1 ) {
931
931
activeTimeoutIds . splice ( index , 1 ) ;
Original file line number Diff line number Diff line change @@ -27,7 +27,6 @@ export default defineComponent({
27
27
canClick : PropTypes . looseBool ,
28
28
} ,
29
29
data ( ) {
30
- this . calcStepOffsetWidth = debounce ( this . calcStepOffsetWidth , 150 ) ;
31
30
return {
32
31
flexSupported : true ,
33
32
lastStepOffsetWidth : 0 ,
@@ -63,7 +62,7 @@ export default defineComponent({
63
62
this . __emit ( 'change' , next ) ;
64
63
}
65
64
} ,
66
- calcStepOffsetWidth ( ) {
65
+ calcStepOffsetWidth : debounce ( function ( ) {
67
66
if ( isFlexSupported ( ) ) {
68
67
return ;
69
68
}
@@ -87,7 +86,7 @@ export default defineComponent({
87
86
this . setState ( { lastStepOffsetWidth : offsetWidth } ) ;
88
87
} ) ;
89
88
}
90
- } ,
89
+ } , 150 ) ,
91
90
} ,
92
91
render ( ) {
93
92
const {
You can’t perform that action at this time.
0 commit comments