pithy-icon
v0.0.0
Published
pithy-icon,基于vue3的小图标组件库
Downloads
1
Readme
Vue 3 + Vite
使用方式
npm导入
npm install demo-ui
main.js全局注册
import { createApp } from 'vue'
import App from './App.vue'
import * as pithyIcon from 'pithy-icon'
const app=createApp(App);
for (const [key, component] of Object.entries(pithyIcon)) {
app.component(key, component)
}
app.mount('#app')
页面部分导入
<template>
<Search/>
</template>
<script setup>
import { Search } from '@/packages'
</script>
使用cdn
注意事项
svg图标并没有设置默认宽高,使用时需要自己定义。颜色继承字体颜色
<template>
<Search/>
</template>
<script setup>
import { Search } from '@/packages'
</script>
<style scoped>
svg{
width: 1rem;
height: 1rem;
color: #3890ff;
}
</style>