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

@ice-breaking/ui

v0.0.5

Published

Ice Breaking UI component library based on Vue 2 and Element UI

Downloads

24

Readme

@ice-breaking/ui

Ice Breaking UI 组件库,基于 Vue 2 和 Element UI 构建。

安装

npm install @ice-breaking/ui
# or
pnpm add @ice-breaking/ui
# or
yarn add @ice-breaking/ui

使用方式

方式一:浏览器直接引入(UMD)

通过 <script> 标签直接在 HTML 中使用:

注意:UMD 格式需要先加载 Vue 和 Element UI,确保它们作为全局变量可用。

<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8" />
    <title>Ice Breaking UI Demo</title>
    <!-- 1. 先引入 Vue(必须) -->
    <script src="https://cdn.jsdelivr.net/npm/vue@2/dist/vue.js"></script>
    <!-- 2. 引入 Element UI CSS -->
    <link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css" />
    <!-- 3. 引入 Element UI JS(必须) -->
    <script src="https://unpkg.com/element-ui/lib/index.js"></script>
    <!-- 4. 最后引入 Ice Breaking UI -->
    <script src="https://unpkg.com/@ice-breaking/ui/dist/umd/index.umd.min.js"></script>
  </head>
  <body>
    <div id="app">
      <v-img src="https://fpoimg.com/300x200" width="300" height="200" />
    </div>

    <script>
      new Vue({
        el: '#app',
        data: {
          // 组件会自动注册为全局组件
        },
      });

      // 组件已自动注册为全局组件
    </script>
  </body>
</html>

CDN 链接:

<!-- 使用 unpkg -->
<script src="https://unpkg.com/@ice-breaking/ui@latest/dist/umd/index.umd.min.js"></script>

<!-- 使用 jsdelivr -->
<script src="https://cdn.jsdelivr.net/npm/@ice-breaking/ui@latest/dist/umd/index.umd.min.js"></script>

使用本地文件:

<!-- 开发版本 -->
<script src="./node_modules/@ice-breaking/ui/dist/umd/index.umd.js"></script>

<!-- 生产版本(压缩) -->
<script src="./node_modules/@ice-breaking/ui/dist/umd/index.umd.min.js"></script>

方式二:全部引入(ESM/CJS)

引入所有组件:

<template>
  <div>
    <v-img src="https://fpoimg.com/300x200" width="300" height="200" />
  </div>
</template>

<script>
import { VImg } from "@ice-breaking/ui";
import ElementUI from "element-ui";
import "element-ui/lib/theme-chalk/index.css";

Vue.use(ElementUI);

export default {
  components: {
    VImg,
  },
};
</script>

方式三:按需引入(推荐)✨

只引入需要的组件,支持 tree-shaking,减小打包体积:

<template>
  <div>
    <v-img src="https://fpoimg.com/300x200" width="300" height="200" />
  </div>
</template>

<script>
// 只引入需要的组件
import { VImg } from "@ice-breaking/ui";
// 或者使用子路径导入
// import VImg from "@ice-breaking/ui/v-img";

import ElementUI from "element-ui";
import "element-ui/lib/theme-chalk/index.css";

Vue.use(ElementUI);

export default {
  components: {
    VImg,
  },
};
</script>

组件列表

  • 🖼️ VImg - 图片组件(支持懒加载、自动裁剪、WebP 转换等)

依赖要求

  • Vue 2.6.0+
  • Element UI 2.15.14+

开发

# 安装依赖
pnpm install

# 构建组件库
pnpm build

# 开发文档
pnpm dev

发布

快速发布

# 使用发布脚本(推荐)
./scripts/publish.sh patch  # Linux/macOS
# 或
scripts\publish.bat patch   # Windows

手动发布

# 1. 构建
pnpm build

# 2. 更新版本号
npm version patch  # 或 minor, major

# 3. 发布到 npm(scoped package 需要 --access public)
npm publish --access public

# 4. 推送标签
git push origin main --tags

详细发布指南请查看 PUBLISH.md

团队发布

如果是团队协作,需要设置发布权限:

文档部署

文档已配置支持 GitHub Pages 部署。

自动部署(推荐)

项目已配置 GitHub Actions,推送到 mainmaster 分支后会自动部署。

步骤:

  1. 在 GitHub 仓库设置中启用 GitHub Pages:

    • 进入仓库 Settings → Pages
    • Source 选择 "GitHub Actions"
  2. 推送代码后,GitHub Actions 会自动构建并部署文档

访问地址:

  • 用户名仓库https://your-username.github.io
  • 项目仓库https://your-username.github.io/仓库名/

手动部署

# 使用部署脚本
./scripts/deploy-docs.sh

详细部署指南请查看 DEPLOY.md

License

MIT