antdvue2.x 使用阿里iconfont自定义组件iconfont

var style = `.icon {
        1em; height: 1em;
       vertical-align: -0.15em;
       fill: currentColor;
       overflow: hidden;
    }`
myutils.loadStyle(style);
var IconFont = {
    name: 'IconFont',
    props: ['type'],
    template: `<span><svg class="icon" aria-hidden="true"><use :xlink:href="'#'+type"></use></svg></span>`
}
原文地址:https://www.cnblogs.com/Im-Victor/p/15200382.html