详细问题描述
nvue 模式一个页面引入2个字体只有一个生效
已经多次重启,重新编译尝试~
代码
<template>
<view style="background-color:#F8F8F8;">
<text style="font-family:graceFont;"></text>
<text style="font-family:mytestfont;"></text>
</view>
</template>
<script>
export default {
data() {
return {}
},
beforeCreate: function(){
var dom = weex.requireModule('dom');
dom.addRule('fontFace', {
'fontFamily': "mytestfont",
'src': "url('https://at.alicdn.com/t/font_1417516_ioiiy0zk5dm.ttf')"
});
dom.addRule('fontFace', {
'fontFamily': "graceFont",
'src': "url('https://at.alicdn.com/t/font_823462_1p2i18cul3t.ttf')"
});
},
methods:{}
}
</script>
<style>
</style>