uniappx-project

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

When to use this skill

何时使用此技能

Use this skill whenever the user wants to:
  • Use any uni-app-x built-in component
  • Use any uni-app-x API (network, storage, device, UI, navigation, media, etc.)
  • Access per-component or per-API examples with official doc links
  • Check platform compatibility for components and APIs in uni-app-x
  • Build uni-app-x applications with Vue 3 + TypeScript + Vite
当用户有以下需求时,可使用此技能:
  • 使用任意uni-app-x内置组件
  • 使用任意uni-app-x API(网络、存储、设备、UI、导航、媒体等)
  • 获取带官方文档链接的单个组件或API示例
  • 查看uni-app-x中组件与API的平台兼容性
  • 基于Vue 3 + TypeScript + Vite构建uni-app-x应用

How to use this skill

如何使用此技能

This skill is organized to match the official uni-app-x components and API documentation:
  1. Choose component or API category:
    • Components →
      examples/components/built-in/
    • APIs →
      examples/api/
      (categorized by domain)
  2. Open the matching example file:
    • Each component or API has its own example file
    • Each example includes the official documentation URL
    • Examples mirror the official documentation examples
  3. Use references when you need full specs:
    • references/components/built-in/
      for built-in components
    • references/api/
      for API parameter/return/compatibility details
本技能的结构与官方uni-app-x组件和API文档保持一致:
  1. 选择组件或API分类
    • 组件 →
      examples/components/built-in/
    • API →
      examples/api/
      (按领域分类)
  2. 打开对应的示例文件
    • 每个组件或API都有独立的示例文件
    • 每个示例都包含官方文档URL
    • 示例与官方文档中的示例保持一致
  3. 需要完整规范时参考参考文档
    • 内置组件参考 →
      references/components/built-in/
    • API参数/返回值/兼容性细节参考 →
      references/api/

Examples and References

示例与参考文档

Components (Built-in)

内置组件

APIs

APIs

Best Practices

最佳实践

  1. One file per component/API: Each component and API has an independent example file with official doc link.
  2. Follow platform compatibility: Check the compatibility section in each example/reference.
  3. Use conditional compilation: Use
    #ifdef
    /
    #endif
    for platform-specific logic.
  4. Keep examples aligned: Use the official documentation examples as the source of truth.
  5. Prefer references for specs: Use
    references/
    for full parameter tables and compatibility.
  1. 单组件/单API对应单个文件:每个组件和API都有独立的示例文件,并附带官方文档链接。
  2. 遵循平台兼容性:查看每个示例/参考文档中的兼容性章节。
  3. 使用条件编译:针对平台特定逻辑使用
    #ifdef
    /
    #endif
  4. 示例与官方保持一致:以官方文档中的示例为标准。
  5. 规范参考优先使用参考文档:如需完整的参数表和兼容性信息,请使用
    references/
    目录下的内容。

Resources

资源

Keywords

关键词

uniappx, uni-app-x, components, api, built-in components, examples, references, Vue 3, TypeScript, Vite, H5, App, mini program, 跨平台, 组件, API, 官方文档
uniappx, uni-app-x, components, api, built-in components, examples, references, Vue 3, TypeScript, Vite, H5, App, mini program, 跨平台, 组件, API, 官方文档