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

au-ui

v1.0.6-beta.4

Published

大屏可视化组件库

Downloads

1

Readme

说明

大屏可视化组件库

使用

按需加载

借助npm install babel-plugin-import -D

// babel.config.js
module.exports = {
  "plugins": [
    [
      "import",
      {
        libraryName: "au-ui",
        style: () => false,
        customName: (name) => {
          function transformName(n) {
            return n.split('').reduce((p, c, i) => {
              if (i === 0) return c.toLocaleLowerCase()
              else if (/^[A-Z]$/.test(c)) return p + '-' + c.toLocaleLowerCase()
              else if (/^\d$/.test(c)) return /^\d$/.test(p.charAt(p.length - 1)) ? (p + c) : (p + '-' + c)
              return p + c
            }, '')
          }
          return `au-ui/packages/${transformName(name)}`
        }
      },
      "au-ui-name" // 第三个参数是针对 babel-plugin-import 使用了多次,必须给它一个唯一的名称
    ]
  ]
}

开发

新增组件

  1. packages 下新建文件夹,名字为你组件的名字
  2. components.json 文件中新增指向你新建的组件的入口文件,同时,key 值是你组件的小写名字
  3. examples/docs 新增 .md 说明文件,文件名 是上述 components.json 中新增 的 key 名字
  4. examples/nav.config.json 添加导航链接

文档书写

  1. 需要放入展示的代码块,必须使用 :::demo 开头,并且以 :::结尾。
  2. 添加表格 以 | 分隔,如下

| 参数 | 说明 | 类型 | 可选值 | 默认值 | |---------- |-------------- |---------- |-------------------------------- |-------- | | html | 显示的文字,绑定html属性,可与message连用 | string | — | — | | propStyle | 内容文字的样式 | string/Object | — | — | | message | 显示的文字,普通内容,可与html连用 | string | — | — | | speed | 单次滚动用时,单位为秒 | number | — | 4 | | timingFunction | 动画的速度曲线,默认匀速 | string | — | linear | | interval | 是否滚动结束时停留一段时间 | boolean | true/false | true |

插入展示效果的代码块

例如:Roll 组件

:::demo Roll 组件提供。

<template>
  <roll message="这是很长的一段文字" />
</template>

:::