Skip to content

支持 RN 系统信息 API 联动 customDimensions - #2581

Open
wangxiaokou wants to merge 4 commits into
masterfrom
feat-customDimensions-systeminfo
Open

支持 RN 系统信息 API 联动 customDimensions#2581
wangxiaokou wants to merge 4 commits into
masterfrom
feat-customDimensions-systeminfo

Conversation

@wangxiaokou

Copy link
Copy Markdown
Collaborator
  • RN 环境下,getWindowInfo 返回的 screenWidth、screenHeight、windowWidth、windowHeight 支持通过 rnConfig.customDimensions 自定义
  • getSystemInfo 和 getSystemInfoSync 同步使用自定义尺寸,并据此计算 deviceOrientation
  • safeArea、statusBarHeight 和 screenTop 仍基于原生窗口及安全区信息计算
  • 补充 RN 配置、系统信息 API 和 Mpx2RN Skill 相关文档

}
let customDimensions = localDimensions
if (typeof mpxGlobal.__mpx?.config?.rnConfig?.customDimensions === 'function') {
customDimensions = mpxGlobal.__mpx.config.rnConfig.customDimensions(localDimensions) || localDimensions

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

你这个调用的入参和style里面的都不拉齐,传递的是原始的Dimension不是你处理后的。。。。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants