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 = {
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 {
Original file line number Diff line number Diff 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 ) ;
Original file line number Diff line number Diff 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 {
You can’t perform that action at this time.
0 commit comments