loading-roll

0.0.2 • Public • Published

组件初始化模版

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    // 触底执行的函数

Dependents (0)

Package Sidebar

Install

npm i loading-roll

Weekly Downloads

0

Version

0.0.2

License

ISC

Unpacked Size

5.41 kB

Total Files

4

Last publish

Collaborators

  • zhou-cs