import React from 'react'; import XBaseLayout, { XBaseLayoutProps } from "../base/XBaseLayout"; import { ContainerType } from "../toolkit/utils/dom"; export interface XAffixProps extends XBaseLayoutProps { /** * 距离窗口顶部达到指定偏移量后触发 */ offsetTop?: number; /** * 距离窗口底部达到指定偏移量后触发 */ offsetBottom?: number; /** * 设置 Affix 需要监听滚动事件的元素 */ scrollContainer?: ContainerType; /** * 固定状态改变时出发的回调函数 * * @param affixed 是否固定 */ onChange?: (affixed?: boolean) => void; /** * 滚动条滚动回调 * * @param affixed 是否固定 */ onScroll?(top: number): void; /** * 位置 */ target?: () => Window | HTMLElement | null; } /** * 把元素固定在某个位置,一般是最上或者最下 * @name 固定位置 * @groupName 网格 */ export default class XAffix extends XBaseLayout { static ComponentName: string; static defaultProps: { offsetTop: number; offsetBottom: any; lazyChildren: boolean; styleType: string; hasBox: boolean; showBorder: any; overflow: string; boxStyle: {}; width: string; height: string; visible: boolean; grid: number[]; gridSpan: number[]; parent: string; pureRender: boolean; dataSourceUrl: string; filterData: {}; mustHasFilter: boolean; }; constructor(props: XAffixProps); render(): React.JSX.Element; }