useEffect(() => {
const handleAppViewHeight = (e: any) => {
if (typeof e.data === 'object') {
if (e.data.appHeight !== undefined) {
setAppViewHeight(e.data.appHeight);
}
};
};
window.addEventListener('message', handleAppViewHeight);
return () => window.removeEventListener('message', handleAppViewHeight);
})
前端项目实战肆佰肆拾贰react-admin和material ui-hook自定义监听事件
最新推荐文章于 2024-08-21 18:16:41 发布