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

taro设计尺寸计算错误 #8089

Closed
geeeger opened this issue Nov 20, 2020 · 3 comments · Fixed by #8998 or #9002
Closed

taro设计尺寸计算错误 #8089

geeeger opened this issue Nov 20, 2020 · 3 comments · Fixed by #8998 or #9002
Labels
F-react Framework - React T-weapp Target - 编译到微信小程序 V-3 Version - 3.x
Milestone

Comments

@geeeger
Copy link

geeeger commented Nov 20, 2020

相关平台

微信小程序

复现仓库

https://github.com
小程序基础库: 2.14.0
使用框架: React

复现步骤

config设置

designWidth: 375,
  deviceRatio: {
    640: 2.34 / 2,
    750: 1,
    828: 1.81 / 2,
    375: 2 / 1
  },

sass中 书写

.test {
 width: 375px;
}

期望结果

.test {
  width: 750rpx
}

实际结果

.test {
  width: 187.5rpx
}

环境信息

� Taro v3.0.17

(node:20460) ExperimentalWarning: Package name self resolution is an experimental feature. This feature could change at any time

  Taro CLI 3.0.17 environment info:
    System:
      OS: Windows 10
    Binaries:
      Node: 13.9.0 - D:\programmer\nodejs\node.EXE
      Yarn: 1.22.0 - D:\programmer\nodejs\yarn.CMD
      npm: 6.13.7 - D:\programmer\nodejs\npm.CMD
@taro-bot2 taro-bot2 bot added F-react Framework - React T-weapp Target - 编译到微信小程序 V-3 Version - 3.x labels Nov 20, 2020
@geeeger
Copy link
Author

geeeger commented Nov 20, 2020

image

@geeeger
Copy link
Author

geeeger commented Nov 20, 2020

340aa3e

postcss-pxtransform 关联修改导致,mini-runner 麻烦官方维护一下版本号,lerna管理我提pr也没啥用。

@lesterlong007
Copy link

好坑啊,Taro版本从3.4升级到3..6.6后,也出现了这个问题,计算成rem有误

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
F-react Framework - React T-weapp Target - 编译到微信小程序 V-3 Version - 3.x
Projects
None yet
3 participants