ant-design-vue/antdv-demo/docs/affix/demo/on-change.md

389 B

#### ๅ›บๅฎš็Šถๆ€ๆ”นๅ˜็š„ๅ›ž่ฐƒ ๅฏไปฅ่Žทๅพ—ๆ˜ฏๅฆๅ›บๅฎš็š„็Šถๆ€ใ€‚ #### Callback Callback with affixed state.
<template>
  <a-affix :offset-top="120" @change="change">
    <a-button>120px to affix top</a-button>
  </a-affix>
</template>
<script>
export default {
  methods: {
    change(affixed) {
      console.log(affixed);
    },
  },
};
</script>