import { Component } from 'react'; import { AffixProps, AffixState } from './iAffix'; declare function noop(): void; declare class Affix extends Component { constructor(props: AffixProps); static defaultProps: { horizontal: boolean; target: () => Window & typeof globalThis; onChange: typeof noop; onTargetChange: typeof noop; zIndex: number; canHidden: boolean; childrenRef: null; initCalc: boolean; }; offsetTopCp?: number; resizeHandler: { remove: () => void; }; scrollHandler: { remove: () => void; }; componentDidMount(): void; componentWillReceiveProps(nextProps: AffixProps): void; componentWillUnmount(): void; /** * 获取container * @return {[type]} [description] */ getContainerDOM: (nextProps?: AffixProps) => Element | Text | null; /** * 第一次 和 每次srcoll和resize也会执行该方法 * initTop,initLeft,marginTop,marginLeft都是不变的 * @return {[type]} [description] */ getInitPosition(nextProps?: AffixProps, flag?: boolean): void; /** * [description]主要用于处理scroll以及reseize事件重新计算布局 * @param {[object]} evt [scroll或者resize事件] * 有两个函数:onChange 和 onTargetChange; */ handleTargetChange: (evt: MouseEvent) => void; /** * 只有上面的方法handleTargetChange使得affixed=ture才会执行 * @return {[type]} [description] */ calculate: () => { fixStyle: {}; boxStyle: {}; }; render(): JSX.Element; } export default Affix;