ant-design-vue自定義使用阿里iconfont圖標
第一步:從iconfont獲取項目js鏈接
第二步 在需要引用iconfont的頁面處加入
1 在Deom中使用: 2 <a> 3 <Fonts type='icon-zutaishitu'/> 4 </a>
1 js代碼 2 import { Icon } from ‘ant-design-vue’; 3 4 const Fonts = Icon.createFromIconfontCN({ 5 scriptUrl: '//at.alicdn.com/t/font_2731654_ew9hs5g22se.js' 6 }) 7 8 export default { 9 components: { 10 Fonts 11 } 12 }
效果: