iconfont-picker-v3
v0.0.3
Published
Iconfront ID,iconfront ID.iconfront ID.
Downloads
1
Maintainers
Readme
iconfont-picker-v3
📦 Install
pnpm i iconfont-picker-v3
全局注册组件
//main.ts
import IconFontPicker, { setupIcon } from 'iconfont-picker-v3'
import "iconfont-picker-v3/dist/style.css" //引入样式文件
...
setupIcon({
id: string[],
});
const app = createApp(App);
app.use(IconFontPicker)
单独引入
<script lang="ts" setup>
import { ref } from 'vue'
import { PIcon,IconPicker } from 'iconfont-picker'
const iconName = ref("")
</script>
<template>
<IconPicker v-model="iconName"></IconPicker>
<PIcon name="#Tomato">
</template>