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 🙏

© 2026 – Pkg Stats / Ryan Hefner

demo-btn

v0.0.5

Published

## 安装 ``` npm i demo-btn ```

Readme

jinjie01

安装

npm i demo-btn

使用

import demo-btn from '/demo-btn'
import 'demo-btn/lib/demo-btn.css'
Vue.use(demo-btn)

组件

  • 按钮my-button
  • 分割线 my-divider
  • 轮播图 my-slider
  • headline

按钮的使用

  • size:按钮的大小,可选值:'mini', 'samll', 'tiny', 'medium', 'large', 'big', 'huge', 'massive',默认为medium
<my-button size="mini">小按钮</my-button>
<br>
<br>
<my-button>默认按钮</my-button>
<br><br>
<my-button size="massive" >大按钮</my-button>
  • icon: 带有图标的按钮
<my-button icon="cloud">图标按钮</my-button>
<br><br>
<my-button icon="warning circle">警告按钮</my-button>
  • disabled:按钮禁用,默认为false
<my-button size="big" disabled>禁用按钮</my-button>
  • loading:加载状态的按钮,默认为false
<my-button loading>加载中...</my-button>
  • animated:按钮带有动画
<my-button animated="fade">
  <div slot="hidden">shop</div>
  <div slot="visible">哈哈哈哈!!</div>
</my-button>
<my-button animated="vertical">
  <div slot="hidden">gogogo</div>
  <div slot="visible">啦啦啦!</div>
</my-button>
  • click:绑定点击事件
<my-button @click1="sub()">点击我啊</my-button>
methods: {
    sub () {
      alert('哈哈哈,欢迎您')
    }
}

分割线的使用

  • 普通分割线
<my-divider></my-divider>
  • 分割线中间显示文字
<my-divider>显示的文字</my-divider>
  • 显示图标
<my-divider icon="user"></my-divider>

轮播图的使用

  • style 设置宽和高
  • list: 设置图片数组
  • auto: 设置图片是否自动轮播
  • currentIndex:当前图标的下标
  • click事件:点击图片做什么
<my-slider
    style="width:500px;height:280px"
    :list='list'
    :currentIndex="currentIndex"
    :auto='2000'
    @click="info"
>
</my-slider>

data () {
    return {
        // 图片数组
        list: [
            { url: require('./imgs/01.jpg'), alt: '111111' },
            { url: require('./imgs/02.jpg'), alt: '222222' },
            { url: require('./imgs/03.jpg'), alt: '333333' },
            { url: require('./imgs/04.jpg'), alt: '444444' },
            { url: require('./imgs/05.jpg'), alt: '555555' }
        ],
        // 当前下标
        currentIndex: 2
    }
},
methods: {
  info (idx) {
    console.log(`点击了第${idx + 1}张图片`)
  }
}

headline的使用

  • headline:可以控制是几级标题
  • icon :是否下是图标
  • 具名插槽:slot = sub 子标题
  • size:可以控制大小
<my-headline :headline="1" icon="user" >
  哈哈哈哈
  <div slot="sub">我是小标题</div>
</my-headline>
<my-headline :headline="2" icon="user">
  哈哈哈哈
  <div slot="sub">我是小标题</div>
</my-headline>

dialog弹窗的使用

  • v-model: 弹窗是否显示
<my-dialog v-model="isShow">
    <div slot="header">哈哈哈哈</div>
    <div slot="content">自定义内容</div>
</my-dialog>

data () {
  return {
    isShow: false
  }
}

Lints and fixes files

npm run lint

Customize configuration

See Configuration Reference.