1
0
mirror of https://gitee.com/vant-contrib/vant.git synced 2025-04-06 03:57:59 +08:00

docs(Sticky): reorder documents ()

This commit is contained in:
Glory 1997 2021-03-17 16:38:09 +08:00 committed by GitHub
parent b3146b9108
commit 062f5c54b4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 17 additions and 17 deletions

@ -38,14 +38,6 @@ app.use(Sticky);
</div>
```
### Offset Bottom
```html
<van-sticky :offset-bottom="50" position="bottom">
<van-button type="primary">Offset Bottom</van-button>
</van-sticky>
```
```js
export default {
setup() {
@ -55,6 +47,14 @@ export default {
};
```
### Offset Bottom
```html
<van-sticky :offset-bottom="50" position="bottom">
<van-button type="primary">Offset Bottom</van-button>
</van-sticky>
```
## API
### Props

@ -48,6 +48,15 @@ app.use(Sticky);
</div>
```
```js
export default {
setup() {
const container = ref(null);
return { container };
},
};
```
### 吸底距离
`position` 设置为 `bottom` 可以让组件吸附在底部。通过 `offset-bottom` 属性可以设置组件在吸底时与底部的距离。
@ -58,15 +67,6 @@ app.use(Sticky);
</van-sticky>
```
```js
export default {
setup() {
const container = ref(null);
return { container };
},
};
```
## API
### Props