npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

vue-long-list-load

v2.0.0

Published

'长列表加载'

Downloads

2

Readme

描述

主要应用长列表加载.解决长列表不固定高度的烦恼,

调用方式

  1. 安装vue-long-list-load:
npm install vue-long-list-load --save
  1. 项目内调用
import longList from 'vue-long-list-load'
<long-list 
  ref="vueLongList"
  dataKey='id' 
  scrollWrapId="manWrap"
  :dataList="dataList" 
  :dataComponent="dataComponent" 
  :componentProps="componentProps"
  height=100
  > 
</long-list>

参数说明

参数 | 说明| 类型 |必填 | 可选值 | 默认值 ---|---|---|---|---|--- scrollWrapId|列表滚动容器id|string|true|—|— dataKey|节点数据内唯一键值|String|true|—|— dataList|列表数据|Array|true|具体见下方说明|— dataComponent|自定义的节点组件|—|true|—|— ref|调用组件内部方法|string|false|—|— direction|滚动方向|Number|false|0:纵向,1横向|0 hideIds|列表中需要隐藏的节点|Array|false|具体见下方说明|[] height|节点高度|Number|false|—|100 componentProps|节点组件要传递的参数|Object|false|—|{} scroll|滚动区域内滚动回调方法|Function|false|-|— resized|某个节点宽高发生变化回调方法|Function|false|具体见下方说明|—

部分参数说明

    <!--假设 dataKey=id-->
    
    <!--列表中需要隐藏的节点-->
    hideIds:[1, 2]
    <!--列表数据  dataList 内 height 为 **Number**。-->
    dataList:[
        {id:1,height:100},
        {id:2,height:200},
        {id:3,height:300},
        {id:4,height:300},
        {id:5,height:300}
    ]
    
   <!--节点高度-->
   height:100
   <!--如果dataList的数据内有height值 不需要设置这个height-->
   <!--如果dataList 和 height 都不传递的话,默认为100 可能滚动略有卡顿;-->
   <!--建议在每个高度都不相同的时候通过dataList传递,都相同时候通过height传递-->
   
   <!--某个节点宽高发生变化回调方法  返回参数为id 与高度-->
   resized(id, height){
       
   }
交流学习邮箱 [email protected]