Skip to content

Vue 组件图标

使用 @qxs-bns/icons 包中的 Vue 组件图标,提供最佳的类型安全和性能。

📦 安装

bash
# npm
npm install @qxs-bns/icons

# yarn
yarn add @qxs-bns/icons

# pnpm
pnpm add @qxs-bns/icons

🚀 基本使用

直接使用图标组件

vue
<script setup>
import { Home, User, Setting } from '@qxs-bns/icons'
</script>

<template>
  <Home />
  <User :size="24" color="#409eff" />
  <Setting :size="32" color="#67c23a" />
</template>

配合 QxsIcon 组件使用

vue
<script setup>
import { QxsIcon } from '@qxs-bns/components'
import { Home, User, Setting } from '@qxs-bns/icons'
</script>

<template>
  <QxsIcon :icon="Home" :size="24" color="#409eff" />
  <QxsIcon :icon="User" :rotate="45" flip="horizontal" />
  <QxsIcon :icon="Setting" :size="32" />
</template>

🎯 优势

  • 类型安全:完整的 TypeScript 支持
  • 按需导入:只打包使用的图标
  • 最佳性能:编译时优化,零运行时开销
  • 无网络依赖:本地资源,离线可用

📚 更多功能

关于 QxsIcon 组件的高级功能(旋转、翻转、颜色等),请参考:

👉 QxsIcon 组件文档

📖 图标列表

查看所有可用的图标:

👉 图标展示

Released under the MIT License.