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

swallow-ui

v0.1.8

Published

## 1. 如何安装 #### yarn :

Readme

swallow-ui

swallow-ui 是一个vue UI 库

1. 如何安装

yarn :

 $ yarn add swallow-ui

npm :

$ npm install swallow-ui

2. 如何使用

(1) 在vue main.js 中引入

import Vue from 'vue';
import swallowUi from 'swallow-ui';
Vue.use(swallowUi);

(2) 在<template></template>中插入UI组件即可

<template>
    <div>
      <s-movediv :sLimit="true" :sTop="300" />
    </div>
</template>

3.组件及其参数

(1) loading组件: 屏幕等待加载时画面

  • 组件名称: s-loading
  • 组件参数:
    • sIsLoading(Boolean) 默认值为 true 是否显示loading组件
    • sStyle(Object) 为组件添加新样式
    • sBoxShow(Boolean) 默认值为 true 是否显示跳动的球体
  • 列式
<template>
    <div>
      <s-loading :sBoxShow="false" :style="{background: 'red'}" />
    </div>
</template>

(2) avatar组件: 头像框

  • 组件名称: s-avatar
  • 组件参数:
    • sSrc(String) 头像图片src
    • sWidth(Number) 默认值为 40 头像框宽度
    • sHeight(Number) 默认值为 40 头像框高度
  • 列式
<template>
    <div>
      <s-avatar sSrc="https://xxx.xxx.jpg" :sWidth="60" />
    </div>
</template>

(3) chatbox组件: 聊天框

  • 组件名称: s-chatbox
  • 组件参数:
    • sAnimation(Boolean) 默认值为 false 点击聊天框时出现动画
    • sContent(String) 绑定聊天框中的内容
    • sSelf(Boolean) 默认值为 false 设置为 true 时显示为我方聊天框
  • 列式
<template>
    <div>
      <s-chatbox sContent="Hello World" :sSelf="true" />
    </div>
</template>
<template>
    <div>
      <s-chatbox :sAnimation="true">
          <p>Hello World</p>
      </s-chatbox >
    </div>
</template>

(4) movediv组件: 移动div

  • 组件名称: s-movediv
  • 组件参数:
    • sLimit(Boolean) 默认值为 false 如果设置为 true 则movediv移动范围为其父级元素的大小范围
    • sBorder(Boolean) 默认值为true 是否显示movediv的边框
    • sWidth(String) 默认值为 200px movdiv的宽度
    • sHeight(String) 默认值为 200px movediv的高度
    • sTop(Number) 设置movdiv初始top(x轴坐标)
    • sLeft(Number) 设置movdiv初始left(y轴坐标)
    • @sCoor(function) 接收 movdiv 传输回来的值({top:xx,left:xx})
  • 列式
<template>
    <div>
      <s-movdiv
        :sLimit="true"
        sWidth="400px"
        sHeight="400px"
        :sTop="200"
        :sLeft="600"
        @sCoor="c => console.log(c.top)"
        >
            <div>
                Hello World
            </div>
        </s-movdiv>
    </div>
</template>

(5) s-input组件: 聊天框

  • 组件名称: s-input
  • 组件参数:
    • sType(String) 默认值为 password s-input类型选择
    • sText(String) 默认值为 '' s-input的左侧字符串值
    • sPlaceholder(String) 默认值为 '' s-input的placeholder值
    • @sValue(function) 接收s-input传输回来的值
  • 列式
<template>
    <div>
      <s-input
        sType="text"
        sText="帐号"
        sPlaceholder="请输入..."
        @sValue="v => console.log(v)"
       />
    </div>
</template>

(5) s-alter组件: 消息通知栏

  • 组件名称: s-alter
  • 组件参数:
    • sMsg(String) 默认值为 ''
    • @sYes(function) 接收点击s-alter组件确定按钮时传输回来的值,(true)
    • @sNo(function) 接收点击s-alter组件取消按钮时传输回来的值,(false)
  • 列式
<template>
    <div>
      <s-alter
        sMsg="xxxxxx"
        @sYes="v => console.log(v)"
        @sNo="v => console.log(v)"
       />
    </div>
</template>