mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
docs(Sticky): reorder documents (#8370)
This commit is contained in:
parent
b3146b9108
commit
062f5c54b4
@ -38,14 +38,6 @@ app.use(Sticky);
|
|||||||
</div>
|
</div>
|
||||||
```
|
```
|
||||||
|
|
||||||
### Offset Bottom
|
|
||||||
|
|
||||||
```html
|
|
||||||
<van-sticky :offset-bottom="50" position="bottom">
|
|
||||||
<van-button type="primary">Offset Bottom</van-button>
|
|
||||||
</van-sticky>
|
|
||||||
```
|
|
||||||
|
|
||||||
```js
|
```js
|
||||||
export default {
|
export default {
|
||||||
setup() {
|
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
|
## API
|
||||||
|
|
||||||
### Props
|
### Props
|
||||||
|
@ -48,6 +48,15 @@ app.use(Sticky);
|
|||||||
</div>
|
</div>
|
||||||
```
|
```
|
||||||
|
|
||||||
|
```js
|
||||||
|
export default {
|
||||||
|
setup() {
|
||||||
|
const container = ref(null);
|
||||||
|
return { container };
|
||||||
|
},
|
||||||
|
};
|
||||||
|
```
|
||||||
|
|
||||||
### 吸底距离
|
### 吸底距离
|
||||||
|
|
||||||
将 `position` 设置为 `bottom` 可以让组件吸附在底部。通过 `offset-bottom` 属性可以设置组件在吸底时与底部的距离。
|
将 `position` 设置为 `bottom` 可以让组件吸附在底部。通过 `offset-bottom` 属性可以设置组件在吸底时与底部的距离。
|
||||||
@ -58,15 +67,6 @@ app.use(Sticky);
|
|||||||
</van-sticky>
|
</van-sticky>
|
||||||
```
|
```
|
||||||
|
|
||||||
```js
|
|
||||||
export default {
|
|
||||||
setup() {
|
|
||||||
const container = ref(null);
|
|
||||||
return { container };
|
|
||||||
},
|
|
||||||
};
|
|
||||||
```
|
|
||||||
|
|
||||||
## API
|
## API
|
||||||
|
|
||||||
### Props
|
### Props
|
||||||
|
Loading…
x
Reference in New Issue
Block a user