You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
38 lines
546 B
38 lines
546 B
3 years ago
|
<docs>
|
||
|
---
|
||
|
order: 1
|
||
|
title:
|
||
|
zh-CN: 固定状态改变的回调
|
||
|
en-US: Callback
|
||
|
---
|
||
|
|
||
|
## zh-CN
|
||
|
|
||
|
可以获得是否固定的状态。
|
||
|
|
||
|
## en-US
|
||
|
|
||
|
Callback with affixed state.
|
||
|
|
||
|
</docs>
|
||
|
|
||
|
<template>
|
||
|
<a-affix :offset-top="120" @change="change">
|
||
|
<a-button>120px to affix top</a-button>
|
||
|
</a-affix>
|
||
|
</template>
|
||
|
<script lang="ts">
|
||
|
import { defineComponent } from 'vue';
|
||
|
export default defineComponent({
|
||
|
setup() {
|
||
|
const change = (affixed: boolean) => {
|
||
|
console.log(affixed);
|
||
|
};
|
||
|
|
||
|
return {
|
||
|
change,
|
||
|
};
|
||
|
},
|
||
|
});
|
||
|
</script>
|