harmony-next
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseHarmonyOS NEXT(离线文档导航)
HarmonyOS NEXT (Offline Documentation Navigation)
目标:在不盲读 的前提下,快速定位到 1 个或少量目标 Markdown,然后只打开这些文件。
references/Goal: Quickly locate 1 or a small number of target Markdown files without blindly reading the contents of , and then open only these files.
references/渐进式披露(按顺序走)
Progressive Disclosure (Follow in order)
-
先缩小范围(选 Kit 或任务)
- Kit 导航:
references/KITS.md - 任务导向:
references/TASK_MAP.md
- Kit 导航:
-
再精确命中文件(搜路径清单)
- 全库路径清单:
references/INDEX.md - JS/ETS API 分桶清单:
references/JsEtsAPIReference/INDEX.md
- 全库路径清单:
-
仅在必要时浏览目录已按桶分层:
references/JsEtsAPIReference/、modules/、topics/、capi/headers/、types/、errors/。guides/
-
Narrow down the scope first (select Kit or task)
- Kit navigation:
references/KITS.md - Task-oriented:
references/TASK_MAP.md
- Kit navigation:
-
Accurately locate files next (search path list)
- Full library path list:
references/INDEX.md - JS/ETS API bucket list:
references/JsEtsAPIReference/INDEX.md
- Full library path list:
-
Browse directories only when necessaryhas been layered by buckets:
references/JsEtsAPIReference/,modules/,topics/,capi/headers/,types/,errors/.guides/
常用检索(直接复制用)
Common Searches (copy directly for use)
- 先按关键词命中路径:
rg -n "UIAbility|AbilityStage|Want" references/INDEX.md | head - 查某个 模块:
@ohos.*rg -n "@ohos\\.app\\.ability\\.|@ohos\\.ability\\." references/JsEtsAPIReference/INDEX.md | head - 查 NDK/C API 头文件:
rg -n "^capi/headers/.*(napi|arkui|window|ability).*\\.h\\.md$" references/JsEtsAPIReference/INDEX.md | head
- Match paths by keyword first:
rg -n "UIAbility|AbilityStage|Want" references/INDEX.md | head - Search for a specific module:
@ohos.*rg -n "@ohos\\.app\\.ability\\.|@ohos\\.ability\\." references/JsEtsAPIReference/INDEX.md | head - Search for NDK/C API header files:
rg -n "^capi/headers/.*(napi|arkui|window|ability).*\\.h\\.md$" references/JsEtsAPIReference/INDEX.md | head
生成约束(避免踩坑)
Generation Constraints (avoid pitfalls)
- 不要全量读取:先在 命中路径,再打开对应
INDEX.md。.md - 不确定就查文档:API 签名、入参、返回值以 内文本为准,不凭经验补全。
references/ - ArkUI 优先声明式:示例优先使用 /
@Entry/@Component(除非文档明确是 NDK 或系统服务)。build()
- Do not read all files: First match the path in , then open the corresponding
INDEX.mdfile..md - Check documentation if unsure: API signatures, input parameters, and return values are subject to the text in , do not complete them based on experience.
references/ - Declarative syntax is preferred for ArkUI: Examples prefer to use /
@Entry/@Component(unless the document explicitly specifies NDK or system service).build()