快速上手
该文档提供快速安装并使用的步骤。
安装
sh
npm install birdpaper-iconsh
yarn install birdpaper-iconsh
pnpm add birdpaper-icon引入
在你的 main.js 或者其他入口文件中引入。
js
import { createApp } from "vue";
import App from "./App.vue";
import BirdpaperIcon from "birdpaper-icon";
import "birdpaper-icon/dist/index.css";
const app = createApp(App);
app.use(BirdpaperIcon).mount("#app");直接使用
vue
<template>
<IconVuejsLine />
</template>动态组件
vue
<template>
<component :is="IconShareFill"></component>
</template>
<script setup lang="ts">
import { IconShareFill } from "birdpaper-icon";
</script>Icon 属性
| size | 图标尺寸 | String | 18px | - |
| fill | 填充颜色 | String | #595959 | - |
| spin | 是否持续旋转 | Boolean | false | - |
| rotate | 旋转角度 | Number | - | - |
附加
js
import { iconType, iconInfo, iconNumbers } from "birdpaper-icon";| iconType | 图标类型数组 | String[] | - | - |
| iconInfo | 图标枚举 | Array<{name:string, list:string[]}> | - | - |
| iconNumbers | 图标数量 | Number | - | - |