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 🙏

© 2025 – Pkg Stats / Ryan Hefner

vue-progressbars

v1.0.4

Published

基于vue的一款进度条组件库

Downloads

8

Readme

基于vue的一款进度条组件

文档

举例

这里主要以第一个默认组件为例子 来举例如何调用使用 组件名为 NormalBar.vue

具体组件API查看下面文档

一 使用方法

  • 安装组件

    npm i vue-progressbar -S
  • 注册组件 在vue文件中引用组件

    import NormalBar from 'vue-progressbar/lib/normalBar'
    components = {
    	NormalBar
    }

二 通用初始化步骤

  • 初始化组件

    data () {
      return {
        normalBar: NormalBar.empty()
      }
    }
  • 绑定data对象

    <NormalBar :value="normalBar" @change="changeNormalBar"/>
  • 监听组件变更 change

    changeNormalBar (value) {
    	this.normalBar = NormalBar.empty(NormalBar.Logic.setCurrentTime(value))   
    }

三 组件相关API

  • NormalBar.vue

    props

    | Options | Type | Description | Default | | :------ | :------:| :------:| :------: | | width | Number | 进度条宽度 | 605 | | height | Number | 进度条高度 | 16 | | totalTime | Number | 总秒数 | 10 | | currentTime | Number | 当前剩余秒数 | 10 | | barDefaultColor | String | 进度条默认底色 | '#E9E9E9' | | barColor | String | 进度条进度底色 | '#FFB936' | | showInfo | Boolean | 是否显示倒计时 | true | | testStyle | Object | 进度条倒计时样式 | 样式对象 |

    methods
    empty

    初始化props 用法如下

    NormalBar.empty({
        totalTime: 15,
        showInfo: false
    })
    Logic

    | Options | Type | Description | Default | | :------ | :------:| :------:| :------: | | setCurrentTime | Function | 设置当前秒数 | props | | setHidden | Function | 设置隐藏倒计时 | props |

    用法如下

    NormalBar.Logic.setCurrentTime(Number) // 更新切换状态
    NormalBar.Logic.setHidden() // 更新切换状态