1、直接写固定样式,没问题,当使用动态绑定style时,使用upx单位在微信小程序端会位置错乱,使用rpx之后正常

固定样式(APP,H5,微信小程序端均正常)

<view style="position: absolute;left: 190upx;top: 15upx;">

动态样式(APP,H5,微信小程序端位置完全错乱)

<view :style="{'position': 'absolute','left': (225 * index + 190) + 'upx','top': '15upx'}">

 必须改为:

<view :style="{'position': 'absolute','left': (225 * index + 190) + 'rpx','top': '15rpx'}">

 

相关文章:

  • 2021-10-22
  • 2021-11-22
  • 2022-12-23
  • 2021-04-24
  • 2022-12-23
  • 2021-09-01
  • 2019-10-24
  • 2022-12-23
猜你喜欢
  • 2021-07-02
  • 2022-12-23
  • 2021-10-20
  • 2021-11-21
  • 2021-12-09
  • 2022-12-23
  • 2021-05-15
相关资源
相似解决方案