mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-27 12:39:49 +08:00
type: update event string type (#49387)
This commit is contained in:
parent
d118e31fe2
commit
0601867703
@ -6,7 +6,7 @@ import throttle from 'lodash/throttle';
|
||||
|
||||
import scrollTo from '../../../../components/_util/scrollTo';
|
||||
|
||||
const listenerEvents = ['scroll', 'resize'] as const;
|
||||
const listenerEvents: (keyof WindowEventMap)[] = ['scroll', 'resize'];
|
||||
|
||||
const useStyle = createStyles(({ token, css }) => {
|
||||
const { boxShadowSecondary, antCls } = token;
|
||||
|
@ -9,7 +9,7 @@ import { ConfigContext } from '../config-provider';
|
||||
import useStyle from './style';
|
||||
import { getFixedBottom, getFixedTop, getTargetRect } from './utils';
|
||||
|
||||
const TRIGGER_EVENTS = [
|
||||
const TRIGGER_EVENTS: (keyof WindowEventMap)[] = [
|
||||
'resize',
|
||||
'scroll',
|
||||
'touchstart',
|
||||
@ -17,7 +17,7 @@ const TRIGGER_EVENTS = [
|
||||
'touchend',
|
||||
'pageshow',
|
||||
'load',
|
||||
] as const;
|
||||
];
|
||||
|
||||
function getDefaultTarget() {
|
||||
return typeof window !== 'undefined' ? window : null;
|
||||
|
Loading…
Reference in New Issue
Block a user