ant-design/components/affix/demo/on-change.md

26 lines
373 B
Markdown
Raw Normal View History

2016-05-26 16:06:15 +08:00
---
2016-10-30 15:11:22 +08:00
order: 1
title:
zh-CN: 固定状态改变的回调
en-US: Callback
2016-05-26 16:06:15 +08:00
---
## zh-CN
2016-05-26 16:06:15 +08:00
可以获得是否固定的状态。
## en-US
Callback with affixed state.
2017-02-13 10:55:53 +08:00
````jsx
2016-05-26 16:06:15 +08:00
import { Affix, Button } from 'antd';
ReactDOM.render(
2016-07-09 16:00:05 +08:00
<Affix offsetTop={120} onChange={affixed => console.log(affixed)}>
<Button>120px to affix top</Button>
2016-10-30 15:11:22 +08:00
</Affix>,
mountNode
);
2016-05-26 16:06:15 +08:00
````