vui-icon
v1.0.7
Published
vue2 svg icon component
Downloads
9
Readme
vui-icon
vue2 svg icon component
The icons are from iconfont.cn
Demo
https://qinshenxue.github.io/vui-icon/
Installation
$ npm install vui-icon
Usage
const Vue = require('vue');
const VuiIcon=require('vui-icon');
Vue.use(VuiIcon);
<vui-icon name="close"></vui-icon>
Icon Style
You should define the icon style in your project as follows.
.vui-icon{
fill:#666
}
.vui-icon:hover{
fill:#000
}
.icon-close{
fill:red
}
How to use your icon
You can download the icon on the iconfont.cn or design your own icon to save as SVG file. Put the SVG file in src/svg/
, and run npm install && npm run build
.
How to change the component name
Find vui-icon
in src/index.js
, change it to your component name, then run npm install && npm run build
.
Component Attributes
| Attribute | Description | Type | | ------------- | ------------- |:-------------:| | name | The name of the SVG file | string | | w | Icon's width | number | | h | Icon's height | number |
ChangeLog
Detailed changes for each release are documented in the release notes.