k***@sanchuanshashi.com
k***@sanchuanshashi.com
  • 发布:2025-02-20 11:40
  • 更新:2025-02-20 11:42
  • 阅读:57

【报Bug】vue的不同版本,字体显示效果不一样

分类:uni-app

产品分类: uniapp/App

PC开发环境操作系统: Windows

PC开发环境操作系统版本号: Win11 22631.4751

HBuilderX类型: 正式

HBuilderX版本号: 4.45

手机系统: iOS

手机系统版本号: iOS 18

手机厂商: 苹果

手机机型: iPhone11,iPhone16 pro max

页面类型: vue

vue版本: vue3

打包方式: 云端

项目创建方式: HBuilderX

示例代码:

<template>
<view class="content">
<image class="logo" src="/static/logo.png"></image>
<view class="text-area">
<!-- #ifdef VUE3 -->
<view class="">
在vue3下面字体展示效果
</view>
<input type="text" />
<!-- #endif -->
<!-- #ifdef VUE2 -->
<view class="">
在vue2下面字体展示效果
</view>
<!-- #endif -->

        <text class="title">Hello</text>  
        <text class="title">你好</text>  
        <text class="title">1234567890</text>  
    </view>  

</view>  

</template>

<script>
export default {
data() {
return {
}
},
onLoad() {

    },  
    methods: {  

    }  
}  

</script>

<style>
.content {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}

.logo {  
    height: 200rpx;  
    width: 200rpx;  
    margin-top: 200rpx;  
    margin-left: auto;  
    margin-right: auto;  
    margin-bottom: 50rpx;  
}  

.text-area {  
    display: flex;  
    flex-direction: column;  
    justify-content: center;  
    font-size: 26px;  
}  

.title {  
    font-size: 26px;  
    color: #8f8f94;  

}  

</style>

操作步骤:

默认模板项目,实际项目都出现这情况

预期结果:

在ios下vue3版本下的所有字体都应该跟vue2版本一致,都为苹方体

实际结果:

在ios下vue3版本只有中文是苹方体

bug描述:

vue2版本打包app运行在ios上面,字母,中文,数字都是苹方体;
vue3版本打包app运行在ios上面,只有中文是苹方体,数字,英文不是;
这样看起来就很奇怪,使用的默认模板项目没有引入其他组件或者字体。

2025-02-20 11:40 负责人:无 分享
已邀请:
k***@sanchuanshashi.com

k***@sanchuanshashi.com (作者)

测试在ios18.3跟18.3.1手机上都出现过,没有其他测试机可供测试了

要回复问题请先登录注册