uniapp introduces Ali font icon
Introduce Ali font icon
The link provides the uni-app font icon Ali icon official website
In nvue, font files cannot be imported directly by using css. You need to use the following methods to import them in js. Nvue does not support local paths to import fonts, please use network links or base64 formats. Single quotes must be used inside the brackets of the url in the src field.
Introduce the address url address of your own icon in Ali in the style
@font-face {
font-family: 'iconfont';
src: url('https://at.alicdn.com/t/c/font_3712746_7jy****') format('truetype');
}
Fill in the full address in the header
https://at.alicdn.com/t/c/fon*****.ttf?t=1*****
Apply directly on the page (html)
<text class="test"></text>
<text class="test"></text>