Vicon is an simple iconfont componenet for vue.
iconfont is a Vector Icon Management & Communication Platform made by Alimama MUX. iconfont
Get your iconfonts from iconfont and then save in your porject.
Select "Symbol" in your project page and then select "Download Code"
unpack downloading zip package and then copy file "iconfont.js" to your new project. Files looks like below:
project/
├── iconfont.js
└── main.js
npm install vicon --save
After installing vicon, the whole project files looks like below:
project/
├── iconfont.js
├── main.js
└── node_modules
└── vicon
└── ...
import and regist vicon/iconfonts in main.js.
import icon from 'vicon'
import './static/icon/iconfont'
Vue.component('icon', icon)
Using icon selected from iconfont in template.
<template>
<icon>tools</icon>
</template>
Note:
- icon name could be found in demo_symbol.html which include in download.zip(file downloaded by step 1)
- you can open demo_symbol.html directly with web browser.