0.0.0 • Published 1 year ago

pithy-icon v0.0.0

Weekly downloads
-
License
-
Repository
-
Last release
1 year ago

Vue 3 + Vite

基于Vue3+Vite构建的svg小图标组件库

使用方式

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>
0.0.0

1 year ago