loading-roll
v0.0.2
Published
:::demo ``` vue <template> <div v-loadingRoll:[options]="handler" style="height: 400px;border: 1px solid red;overflow: auto;"> <div class='roll-load' style="height: 800px;background:#771caa"></div> <div >。。。。</div> </div>
Downloads
1
Readme
组件初始化模版
demo演示
:::demo
<template>
<div v-loadingRoll:[options]="handler" style="height: 400px;border: 1px solid red;overflow: auto;">
<div class='roll-load' style="height: 800px;background:#771caa"></div>
<div >。。。。</div>
</div>
</div>
</template>
<script>
export default {
data() {
return {
options:{
// selector:'.roll-load',
distance : 5,
time: 300
}
}
},
methods: {
handler(){
console.log('触底')
},
},
mounted () {
}
};
</script>
:::
参数说明
binding.value.arg : object
options
{
selector:'', // 不传默认为当前元素 , 否则为子元素
distance : 5, // 触底距离
time: 300 // 节流事件
}
binding.value : func // 触底执行的函数