ng-lib-tsx
Version:
pc端基础类库
27 lines (26 loc) • 796 B
TypeScript
import React, { CSSProperties } from 'react';
interface IAutoResize {
children: React.ReactNode;
onResize?: ({ width, height }: {
width: any;
height: any;
}) => void;
delay?: number;
style?: CSSProperties;
beforeResize?: Function;
}
/**
* 组件自适应容器
* @param children 需要自适应的组件
* @param style
* @param onResize 父容器高宽变化时回调,undefined 则直接返回children组件
* @param beforeResize
* @param delay
* @constructor
*/
export declare function AutoResize({ children, style, onResize, beforeResize, delay }: IAutoResize): JSX.Element;
/**
* 不支持ResizeObserver的浏览器,resize事件绑定在window页面,需要手动调用触发
*/
export declare function polyfillResize(): void;
export {};