izhangshumeng
izhangshumeng
  • 发布:2025-05-19 11:22
  • 更新:2025-05-19 11:22
  • 阅读:86

webview在部分 android15 手机上出现页面跳动问题

分类:uni-app

产品分类: uniapp/App

PC开发环境操作系统: Mac

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

HBuilderX类型: 正式

HBuilderX版本号: 4.65

手机系统: Android

手机系统版本号: Android 15

手机厂商: 小米

手机机型: Redmi Turbo 3

页面类型: nvue

vue版本: vue2

打包方式: 云端

项目创建方式: HBuilderX

操作步骤:

nvue页面,使用web-view组件,加载h5链接

<template>  
    <view>  
        <web-view   
        ref="webview"  
        :style="{  
            position: 'fixed',  
            top: marginTop + 'px',  
            left: 0,  
            width: screenWidth + 'px',  
            height: (screenHeight - marginTop) + 'px'  
        }"  
        :src="url"   
        :update-title="false"  
        @onPostMessage="onPostMessage"   
        />  

    </view>  
</template>  

onLoad(opt) {  
    const systemInfo = uni.getSystemInfoSync()  
    const statusBarHeight = systemInfo.statusBarHeight  
    this.marginTop = 56 + statusBarHeight  
    this.screenWidth = systemInfo.screenWidth  
    this.screenHeight = systemInfo.screenHeight  

    this.url = 'https://www.baidu.com/'  
}

预期结果:

各系统运行正常

实际结果:

android15 部分手机上滑动页面会出现页面内容时隐时现

bug描述:

android15 部分手机上使用webview时,滑动页面会出现页面内容时隐时现

2025-05-19 11:22 负责人:无 分享
已邀请:

要回复问题请先登录注册