Skip to content

fix(rn): 完善样式支持情况 for Android and Harmony#2445

Open
dos1in wants to merge 5 commits intodidi:masterfrom
dos1in:fix/valid-style
Open

fix(rn): 完善样式支持情况 for Android and Harmony#2445
dos1in wants to merge 5 commits intodidi:masterfrom
dos1in:fix/valid-style

Conversation

@dos1in
Copy link
Copy Markdown
Member

@dos1in dos1in commented Mar 13, 2026

样式验证

@dos1in dos1in changed the title fix(rn): 更新 text-decoration-style 支持情况 for Android and Harmony fix(rn): 完善样式支持情况 for Android and Harmony Mar 17, 2026
@dos1in dos1in marked this pull request as draft March 26, 2026 11:17
dos1in added 2 commits March 26, 2026 19:48
RNOS C++ 层解析了 boxShadow,但 ArkTS 层没有消费它,所以 rawProps.boxShadow 依然是 undefined。MPX 需要把 box-shadow 转成 shadow* 属性,走已有的 shadowRadius/shadowColor/shadowOffset/shadowOpacity → rawProps → ViewDescriptorWrapper.shadow → ArkUI shadow() 通路
@dos1in
Copy link
Copy Markdown
Member Author

dos1in commented Mar 26, 2026

CppComponentInstance.h 的 onPropsChanged 只处理了 iOS 风格的 shadowColor/shadowOffset/shadowOpacity/shadowRadius,没有处理 boxShadow,已提 PR 让鸿蒙修复。

在RNOH 修复前,Mpx 需要在 JS 层提前将 box-shadow 转成 shadow* 属性,走已有的 shadow* → rawProps → ViewDescriptorWrapper.shadow → ArkUI shadow() 链路。

修复后效果:

harmony-boxShadow

@dos1in dos1in marked this pull request as ready for review March 26, 2026 12:35
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.

1 participant