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

virtual-tree-bonc

v0.0.4

Published

``` 本组件是使用el-tree的源码结合虚拟滚动插件vue-virtual-scroll-list二次封装的js组件,适用于大数据量的树形图,目前最多支持20W+左右的数据,可支持el-tree的懒加载等内置方法。

Downloads

1

Readme

virtual-tree-bonc组件概述

    本组件是使用el-tree的源码结合虚拟滚动插件vue-virtual-scroll-list二次封装的js组件,适用于大数据量的树形图,目前最多支持20W+左右的数据,可支持el-tree的懒加载等内置方法。
    
    所以在使用时,项目中会自动安装elementUI和vue-virtual-scroll-list这两个vue插件。
    
    在使用过程中,除了ts项目需要注意一些额外事项,组件内置方法和属性用法完全参考elementUI的el-tree组件。

在Nuxt+Ts工程使用注意事项

  • nuxt工程plugins文件夹中需要先注册组件 XXX.ts

    import Vue from 'vue'; import VirtualTree from 'virtual-tree-bonc'; Vue.component('XXX', bigTree);

  • nuxt.config.ts中需要先注册本组件为client组件。

    { src: '~/plugins/virtualtree.ts', mode: 'client', }

  • ts项目中引入js插件,需要配置 xxx.d.ts文件

    新建xxx.d.ts文件,里面写一行代码 declare module 'VirtualTree';

本地测试插件

npm pack

  • npm pack 之后,会在当前目录下生成一个 xx-btn-1.0.0.tgz 的文件。
  • 打开一个项目,将压缩文件放到项目某个目录下,执行命令
  • npm install 路径\xx-btn-1.0.0.tgz
  • 路径是指压缩包所在的绝对路径,文件名必须是压缩包的全名

删除包

npm login

npm publish

npm unpublish [email protected] //指定版本号

在其他项目引用