-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Open
Labels
Description
Version of antd-mobile
5.39.0
Operating system and its version
No response
Browser and its version
No response
Sandbox to reproduce
No response
What happened?
FloatingPanel 没有触发 onHeightChange事件
import {useRef} from 'react';
import {FloatingPanel, List} from 'antd-mobile';
function App() {
const ref = useRef(null);
const data = ['A', 'B', 'C', 'D', 'E'];
const anchors = [
100,
Math.round(window.innerHeight * 0.4),
Math.round(window.innerHeight * 0.8)
];
return (
<FloatingPanel
ref={ref}
anchors={anchors}
handleDraggingOfContent={true}
onHeightChange={(height, animating) => {
console.log('拖拽高度:', height, '动画中:', animating);
}}
>
<List>
{data.map((item, index) => (
<List.Item key={index}>{item}</List.Item>
))}
</List>
</FloatingPanel>
);
}
export default App;