refactor(PosterBuilder): 使用getWindowInfo替代getSystemInfoSync获取屏幕宽度
getSystemInfoSync已被弃用,改用推荐的getWindowInfo方法获取窗口信息
Showing
1 changed file
with
1 additions
and
1 deletions
| ... | @@ -102,7 +102,7 @@ export function mapHttpToHttps(rawUrl) { | ... | @@ -102,7 +102,7 @@ export function mapHttpToHttps(rawUrl) { |
| 102 | * @returns { number } factor 单位转换系数 1rpx = factor * px | 102 | * @returns { number } factor 单位转换系数 1rpx = factor * px |
| 103 | */ | 103 | */ |
| 104 | export const getFactor = () => { | 104 | export const getFactor = () => { |
| 105 | - const sysInfo = Taro.getSystemInfoSync(); | 105 | + const sysInfo = Taro.getWindowInfo(); |
| 106 | const { screenWidth } = sysInfo; | 106 | const { screenWidth } = sysInfo; |
| 107 | return screenWidth / 750; | 107 | return screenWidth / 750; |
| 108 | }; | 108 | }; | ... | ... |
-
Please register or login to post a comment