# 自定义上下滑动 this.slideSync(height)
等待节点出现后自动滑到节点的最底部,实现获取界面的懒加载
| 参数名 | 类型 | 必填 | 说明|
| --- | --- |--- | --- |
| height| int| 是 | 要滑动的距离 |
### 示例
```
<div class="demo0">我是节点0</div>
<div id="demo1" style="width: 100%; height: 1000px; background-color: antiquewhite;">我是节点1</div>
<div class="demo0">我是底部</div>
async mounted() {
await this.slideSync(1000)
}
```
# 自定义滑动 this.slide(object)
等待节点出现后自动滑到节点的最底部,实现获取界面的懒加载
| 参数名 | 类型 | 必填 | 说明|
| --- | --- |--- | --- |
| height| int| 是 | 要滑动的距离 |
| success | function| 是 | 成功返回 |
### 示例
```
<div class="demo0">我是节点0</div>
<div id="demo1" style="width: 100%; height: 1000px; background-color: antiquewhite;">我是节点1</div>
<div class="demo0">我是底部</div>
async mounted() {
this.slide(1000).then( () => {
console.log('hello')
})
}
```
# 滑动到节点的最底部 this.slideDomDownSync(el)
等待节点出现后自动滑到节点的最底部,实现获取界面的懒加载
| 参数名 | 类型 | 必填 | 说明|
| --- | --- |--- | --- |
| el| string | 是 | 元素的ID(#元素的id)或者元素的class(.+元素的class) |
### 示例
```
<div class="demo0">我是节点0</div>
<div id="demo1" style="width: 100%; height: 1000px; background-color: antiquewhite;">我是节点1</div>
<div class="demo0">我是底部</div>
async mounted() {
await this.slideDomDownSync('.demo1')
//
}
```
# 滑动到节点的最底部 this.slideDomDown(object)
等待节点出现后自动滑到节点的最底部,实现获取界面的懒加载
| 参数名 | 类型 | 必填 | 说明|
| --- | --- |--- | --- |
| el| string | 是 | 元素的ID(#元素的id)或者元素的class(.+元素的class) |
| success | function| 是 | 成功返回 |
### 示例
```
<div class="demo0">我是节点0</div>
<div id="demo1" style="width: 100%; height: 1000px; background-color: antiquewhite;">我是节点1</div>
<div class="demo0">我是底部</div>
async mounted() {
this.slideDomDown({
el : '.demo1',
success : () => {
console.log('下滑完成')
}
})
}
```
# 拖动