Skip to content

icon-svg

字体图标库

安装

bash
pnpm add @magustek/icon-svg

全局使用

ts
import { createApp } from "vue";
import * as SvgIcons from "@magustek/icon-svg";

const app = createApp();

for (const [name, comp] of Object.entries(SvgIcons)) {
  app.component(name, comp);
}

配合 MgIcon 组件使用

vue
<template>
  <MgIcon color="red" size="24">
    <Edit></Edit>
  </MgIcon>
</template>

<script type="ts" setup>
import { MgIcon } from "@magustek/framework-ui"
import { Edit } from '@magustek/icon-svg'
</script>