在APP.VUE中
<script>
export default {
onLaunch: function() {
console.log('App Launch')
},
onShow: function() {
console.log('App Show')
},
onHide: function() {
console.log('App Hide')
}
}
</script>
<style>
/*每个页面公共css */
@font-face {
font-family: "webfont";
font-display: swap;
src: url('./static/webfont.eot');
/* IE9 */
src: url('./static/webfont.eot?#iefix') format('embedded-opentype'),
/* IE6-IE8 */
url('./static/webfont.woff2') format('woff2'),
url('./static/webfont.woff') format('woff'),
/* chrome、firefox */
url('./static/webfont.ttf') format('truetype'),
/* chrome、firefox、opera、Safari, Android, iOS 4.2+*/
url('./static/webfont.svg#webfont') format('svg');
/* iOS 4.1- */
}
body{
font-family: "webfont" !important;
font-size: 16px;
font-style: normal;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
.web-font {
font-family: "webfont" !important;
font-size: 16px;
font-style: normal;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
</style>
index.vue 中
<template>
<view>
<view class="web-font">我的提哦啊吗阿萨德啊</view>
</view>
</template>
<script>
export default {
}
</script>
<style scoped>
</style>
```javascript
这个是目录结构
今天回复我了吗 (作者)
字体图标的我行,中文的引入的好像有点问题
2019-12-19 17:39