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

picker-card

v1.0.4

Published

Designed to solve the problem of display and selection of multilevel tree structures

Downloads

6

Readme

picker-card

一种卡片式的联动选择器,旨在解决JS多级树结构展现方式,picker-card可以更多的层次结构数据展示和选择。

2020/3/8 第一版

2020/3/13 正式第一版发布

体验地址:http://moxiaofei.com/picker-card/example/index.html

第一次写js插件,难免疏忽大意,大佬莫怪

使用

script标签引入方式使用

<body>
    <button id="btn">触发按钮</button>	
</body>    
<script src="picker-card.min.js"></script>
<script>
let list = [{text:'一级-1'.children:[{text:'二级-1-2'}]},{text:'一级-2'}]    
new PickerCard({
    trigger:'#btn',
    list:list,
    success:function(res,o) {
        //返回选择项  o对象是最后选择项的对象
        document.getElementById('btn').innerHTML = res
        console.log(o)
    }
})
</script>

参数配置

  • trigger:触发元素,值可以是DOM节点元素,也可以是选择器字符串
  • title:标题
  • list:注入的数据
  • isShowControl:是否显示操作按钮 默认是 false 不显示
  • success:选择完成后的回调 ======= 一种卡片式的联动选择器

2020/3/8 完成picker-card第一个版本

示例1

示例2