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.
42 lines
646 B
42 lines
646 B
<docs>
|
|
---
|
|
order: 0
|
|
title:
|
|
zh-CN: 基本
|
|
en-US: Basic
|
|
---
|
|
|
|
## zh-CN
|
|
|
|
最简单的用法。
|
|
|
|
## en-US
|
|
|
|
The simplest usage.
|
|
|
|
</docs>
|
|
|
|
<template>
|
|
<a-affix :offset-top="top">
|
|
<a-button type="primary" @click="top += 10">Affix top</a-button>
|
|
</a-affix>
|
|
<br />
|
|
<a-affix :offset-bottom="bottom">
|
|
<a-button type="primary" @click="bottom += 10">Affix bottom</a-button>
|
|
</a-affix>
|
|
</template>
|
|
|
|
<script lang="ts">
|
|
import { defineComponent, ref } from 'vue';
|
|
export default defineComponent({
|
|
setup() {
|
|
const top = ref<number>(10);
|
|
const bottom = ref<number>(10);
|
|
return {
|
|
top,
|
|
bottom,
|
|
};
|
|
},
|
|
});
|
|
</script>
|