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

@zhiaiwan-icons/vue

v1.0.0

Published

zhiaiwan-icons 的 Vue 2 图标包。

Readme

@zhiaiwan-icons/vue

Vue 2 图标包,对应 IconPark 的 @icon-park/vue。

同一份 SVG 资产与元数据编译产出;默认 fill: currentColor、prefix: 'i'(类名 i-icon)。

  • 提供 2000+ 图标
  • 四种主题:outline / filled / two-tone / multi-color

安装

npm install @zhiaiwan-icons/vue --save
# 或
pnpm add @zhiaiwan-icons/vue

引入组件

在组件顶部引入图标,并在 template 中使用:

<template>
  <Home theme="filled" />
</template>

<script>
import { Home } from '@zhiaiwan-icons/vue'

export default {
  components: { Home },
}
</script>

若不希望逐个注册,可全局安装全部图标(体积较大,推荐按需引入):

import Vue from 'vue'
import { install } from '@zhiaiwan-icons/vue'

// 默认注册为 icon-{name},如 icon-home
install(Vue)
// 自定义前缀:install(Vue, 'i') → <i-home />

样式

import '@zhiaiwan-icons/vue/styles/index.css'

全局配置

使用 IconProvider 包裹子树(内部通过 provide 下发配置;单图标 props 仍可覆盖):

<template>
  <IconProvider :value="iconConfig">
    <Home />
  </IconProvider>
</template>

<script>
import { DEFAULT_ICON_CONFIGS, IconProvider, Home } from '@zhiaiwan-icons/vue'
import '@zhiaiwan-icons/vue/styles/index.css'

export default {
  components: { IconProvider, Home },
  data() {
    return {
      iconConfig: { ...DEFAULT_ICON_CONFIGS, prefix: 'icon' },
    }
  },
}
</script>

按需引入

可配合 babel-plugin-import 按需加载:

{
  "plugins": [
    [
      "import",
      {
        "libraryName": "@zhiaiwan-icons/vue",
        "libraryDirectory": "es/icons",
        "camel2DashComponentName": false
      }
    ]
  ]
}

动态图标

推荐按需加载以减小体积。远程菜单等场景可用 IconPark 按 type 动态渲染(支持 PascalCase / kebab-case):

<template>
  <IconPark type="AddText" theme="filled" />
  <IconPark type="add-text" theme="filled" />
</template>

<script>
import { IconPark } from '@zhiaiwan-icons/vue'

export default {
  components: { IconPark },
}
</script>

嵌入元数据

如需图标名称、作者、分类、标签等信息,可使用包根目录的 icons.json:

import icons from '@zhiaiwan-icons/vue/icons.json'

图标属性

| 属性 | 说明 | 类型 | 默认 | | --- | --- | --- | --- | | theme | 图标主题 | 'outline' \| 'filled' \| 'two-tone' \| 'multi-color' | outline | | size | 宽高 | number \| string | 1em | | spin | 旋转动画 | boolean | false | | fill | 主题颜色;多色时传数组 | string \| string[] | currentColor | | strokeLinecap | 端点 | 'butt' \| 'round' \| 'square' | round | | strokeLinejoin | 拐点 | 'miter' \| 'round' \| 'bevel' | round | | strokeWidth | 描边粗细 | number | 4 |

主题与颜色

fill 与 theme 共同决定最终 colors[]:

| theme | colors[0] | colors[1] | colors[2] | colors[3] | | --- | --- | --- | --- | --- | | outline | fill[0] | none | fill[0] | none | | filled | fill[0] | fill[0] | #FFF | #FFF | | two-tone | fill[0] | fill[1] | fill[0] | fill[1] | | multi-color | fill[0] | fill[1] | fill[2] | fill[3] |

多色推荐顺序:['外描边', '外填充', '内描边', '内填充'],例如 ['#333','#2F88FF','#FFF','#43CCF8']。