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

z-progress-loading

v0.1.8

Published

Vue progress loading component

Downloads

2

Readme

z-progress-loading

npm package npm download github license github language top github stars

NPM

基于 canvas 实现的加载进度条 vue 组件。(现在支持基于 dom 实现的配置)

Features

  • 可作为 loading 组件使用
  • 可作为 pregress-bar 组件使用
  • 可作为音乐播放进度条使用

Preview

对应 demo 代码在 examples 目录

How to use

npm install --save z-progress-loading
<template>
  <div #app>
    <ZProgressLoading :progress="progress" :start="start" :config="config" />
  </div>
</template>

<script>
import ZProgressLoading from 'z-progress-loading';
export default {
  components: {
    ZProgressLoading
  },
  // ...
}
</script>

Start

# 本地调试 localhost:3000
npm start # 或 npm run serve

# 编译 产物位于 dist 目录
npm run build

# 发布
npm run release

Params Config

  • progress: 传入进度,取值 0 - 100 之间;若不需要可始终传入 0 或 100。

  • start: 控制开始暂停。

  • config: 样式配置;elem 的概念是每一个小矩形;

    • renderer: 渲染方式,默认为 "dom",可选 "canvas"

    • elemWidth: 单个小矩形宽度

    • elemMinHeight: 小矩形最小高度

    • elemMaxHeight: 小矩形最大高度;最小最大高度相同时,将不会跳动

    • elemDeltaHeight: 初始时不同小矩形的高度差值

    • spacing: 小矩形间距;间距为 0 时将连成不间断的进度条

    • step: 小矩形跳动时高度变化的步长;默认为 1;值越大跳动时变化越快

    • bgColor: 未达到进度的小矩形颜色

    • foreColor: 已达到进度的小矩形颜色

    • lineCap: 线条裁切方式,默认为直角 "square",可选圆角 "round"

Recently Updated

Changelog available here.

License

The project is licensed under the terms of MIT license.