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

bb-loading

v1.0.7

Published

一个适用于Vue2的loading加载动画

Readme

b-loading

很多组件库并不支持指令形式的 loading 加载,所以就有了这个

npm install bb-loading -S

main.js

import BLoading from 'bb-loading'
Vue.use(BLoading)
this.$Bloading.init(config) // config可选参数

// 例

config: {
    type: 0, // 修改图标 0 || 1
    mask: 'rgba(44, 42, 57, 0.3)', // 遮罩层背景色
    color: '#1890ff', // 图标颜色
    text: 'Loading...', // 显示文本
    textColor: '#FFF' // 文本颜色
    iconColor: '#1890ff', // 图标颜色
    iconSize: 24 // 图标大小
}

config 配置参数

| 配置项 | 类型 | 说明 | 默认值 | | ----------- | -------- | ---------------- | ------------------------- | | type | number | 图标类型,0 或 1 | | mask | string | 遮罩层的背景色 | 'rgba(44, 42, 57, 0.3)' | | color | string | 图标的颜色 | '#1890ff' | | text | string | 显示的文本内容 | 'Loading...' | | textColor | string | 文本的颜色 | '#FFF' | | iconColor | string | 图标的颜色 | '#1890ff' | | iconSize | number | 图标的大小 | 24 |

其他页面使用

  1. 调用模式
this.$Bloading.show() // 显示
this.$Bloading.hide() // 隐藏
  1. 指令模式
<div v-bloading="loading"></div>


export default {
    data() {
        return {
            loading: true
        }
    }
}

更新记录

V0.0.10

  1. 第一版本

V1.0.0

  1. 新增指令模式调用
  2. 新增 loading icon
  3. 新增 config 配置项

V1.0.4

  1. 解决循环中使用指令时只加载最后一个的问题

V1.0.6

  1. 取消控制台一直重复警告

V1.0.7

  1. 修复 - 如果有多个元素绑定指令 避免触发到所有元素
  2. 更新 - 使用 :scope 方式修改获取元素方式