38 lines
		
	
	
		
			546 B
		
	
	
	
		
			Vue
		
	
	
			
		
		
	
	
			38 lines
		
	
	
		
			546 B
		
	
	
	
		
			Vue
		
	
	
<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>
 |