openharmony-ui-reference
Installation
SKILL.md
OpenHarmony UI 快速参考
概述
OpenHarmony 使用 ArkTS (基于 TypeScript 的声明式 UI) 来构建用户界面。核心概念:声明式 UI 描述、组件化架构、状态管理装饰器、响应式布局。
官方文档: docs-OpenHarmony-v6.0-Release/zh-cn/application-dev/ui/
快速参考: docs/ (本地提取的核心文档)
状态管理
V2 (推荐用于新项目)
| 装饰器 | 用途 | 作用域 |
|---|---|---|
@Local |
组件内部状态 | 仅组件内部 |
@Param |
父 → 子 (单向) | 父到子 |
@Event |
子 → 父回调 | 子到父 |
@Provider/@Consumer |
跨组件同步 | 任意后代组件 |
Related skills
More from mengfei0053/skills
openharmony-arkts-utils
OpenHarmony ArkTS工具库快速参考 - 并发、TaskPool、Worker、Sendable、XML、Buffer、JSON、容器和运行时特性
30openharmony-ability-kit
用于使用 Ability Kit 开发 OpenHarmony 应用时 - UIAbility 生命周期、使用 Want 进行组件通信、Context API、ExtensionAbility、BundleManager,或处理错误如 16000001(ability 未找到)、16000011(context 不存在)等
17openharmony-error-detection
Use when developing OpenHarmony applications to detect and fix errors systematically through lint, unit tests, compilation, automated search, and documentation lookup
16openharmony-testing-apis
当开发 OpenHarmony 应用需要使用 JsUnit、UiTest 或 PerfTest 框架进行测试时,或需要模拟 UI 交互、测量性能指标、实现自定义测试运行器时使用
12