Skip to content

feat: RN 新增 notifyDimensionsChange 配置,支持手动触发 dimensions 更新#2485

Open
mackwang112 wants to merge 5 commits into
masterfrom
fix-customDimensions-type
Open

feat: RN 新增 notifyDimensionsChange 配置,支持手动触发 dimensions 更新#2485
mackwang112 wants to merge 5 commits into
masterfrom
fix-customDimensions-type

Conversation

@mackwang112
Copy link
Copy Markdown
Collaborator

Summary

  • 新增 notifyDimensionsChange 方法,允许手动通知框架重新计算 rpx、vw、vh、媒体查询、onResize 等依赖尺寸的功能
  • 不传参时默认使用当前全局 dimensions,并重新执行 customDimensions 转换逻辑
  • 顺带优化 customDimensions 类型定义,去除无实际约束意义的泛型参数 T

Test plan

  • 折叠屏/分屏环境下手动调用 notifyDimensionsChange 验证 rpx/媒体查询更新
  • 不传参调用验证 customDimensions 重新执行
  • 确认 TypeScript 类型检查通过

mackwang112 and others added 5 commits May 11, 2026 21:30
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@mackwang112 mackwang112 added the platform:RN Mpx 跨端输出 RN label May 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

platform:RN Mpx 跨端输出 RN

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant