ant-design/components/affix/demo/on-change.md
2020-01-21 17:14:58 +08:00

372 B

order title
1
zh-CN en-US
固定状态改变的回调 Callback

zh-CN

可以获得是否固定的状态。

en-US

Callback with affixed state.

import { Affix, Button } from 'antd';

ReactDOM.render(
  <Affix offsetTop={120} onChange={affixed => console.log(affixed)}>
    <Button>120px to affix top</Button>
  </Affix>,
  mountNode,
);