mirror of
https://github.com/youzan/vant.git
synced 2025-10-20 18:54:24 +00:00
docs(Sticky): reorder documents (#8370)
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user