Icon fonts and SVG sprite are not included here. I'm talking about an icon system that can let users import icons by demand.
There are three major ways of exposing API of an icon component in Vue.js and each one of them has its own pros & cons:
-
A single component (eg.
<v-icon>
), let users pass aname
/type
prop to specify the actual icon.Icon data are registered into a global “pool” like: