Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

uniapp 2.6.16版本升级到2.7版本后rpx单位转换(一定分辨率下,1920*1080)可能出现问题了 #1848

Closed
cz1997-start opened this issue Jul 2, 2020 · 3 comments
Labels
bug Something isn't working

Comments

@cz1997-start
Copy link

cz1997-start commented Jul 2, 2020

问题描述
uniapp 2.6.16版本升级到2.7版本后rpx单位转换(一定分辨率下,1920*1080)可能出现问题了,原本占满全屏的内容现在只有一半了,目前只在vue页面上发现这个问题,nvue不存在此问题.复现问题中第一张正常是(2.6.16)的,第二张不正常的是(2.7.13),第三张是(2.7.13)里面的nvue页面.

复现步骤
[复现问题的步骤]
``
2 6 16
2 7 14
nvue

[或者可以直接贴源代码]

预期结果
正常显示

实际结果
错误显示

系统信息:

  • 发行平台: APP
  • 操作系统 :Android 6.0
  • HBuilderX版本 :2.7.13
  • uni-app版本 [如使用Vue-cli创建/运行项目,则提供npm run info的运行结果]
  • 设备信息 [如 iPhone8 Plus]

补充信息
[可选]
[根据你的分析,出现这个问题的原因可能在哪里?]
猜测是rpx的在(1920*1080)下的转换可能有问题(2.6.16版本以后).

@Fasttian
Copy link
Contributor

.vue 测试 rpx 未能复现, 1920*1080 仍然能铺满屏幕, 你可以用下面这个简单的示例,自己测试一下

<template>    
    <view class="container">    
        <view class="A">第一行 A</view>  
        <view class="B">第二行 B</view>  
    </view>    
</template>    

<script>    
    export default {    

    }    
</script>  

<style>  
    .container {  
        display: flex;  
        height: 1080px;  
    }  
    .A {  
        width: 375rpx;  
        height: 100%;  
        background-color: #1AAD19;  
    }  

    .B {  
        width: 375rpx;  
        height: 100%;  
        background-color: #FFB400;  
    }  
</style>

@dcloudhdx
Copy link
Contributor

Bug已确认,计算宽高颠倒导致

@dcloudhdx
Copy link
Contributor

HBuilderX 2.8.1+ alpha 版已修复

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants