�鸿蒙报错速查:@Trace �装在 V1 @Component 编译就炸,V2 装饰器只能装 @ComponentV2,根因 + 真解法
报错原文
ERROR: 10505001 ArkTS Compiler Error
Error Message: Trace can only be used in V2 components. At File: xxx.ets:N:N真机配图:V2 正解能编译能跑
Trace 装在 ComponentV2 里——正解,能编译能跑。改嵌套对象成员真触发 UI 重绘:…
2026/7/22 13:49:54