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

27 lines
402 B
Markdown
Raw Normal View History

2018-03-02 08:54:22 +00:00
<cn>
#### 固定状态改变的回调
可以获得是否固定的状态。
</cn>
<us>
#### Callback
Callback with affixed state.
</us>
2019-10-09 10:32:23 +00:00
```tpl
2018-03-02 08:54:22 +00:00
<template>
<a-affix :offsetTop="120" @change="change">
<a-button>120px to affix top</a-button>
</a-affix>
</template>
<script>
2019-09-28 12:45:07 +00:00
export default {
methods: {
change(affixed) {
console.log(affixed);
},
},
};
2018-03-02 08:54:22 +00:00
</script>
```