uniappx-project
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseWhen 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:
-
Choose component or API category:
- Components →
examples/components/built-in/ - APIs → (categorized by domain)
examples/api/
- Components →
-
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
-
Use references when you need full specs:
- for built-in components
references/components/built-in/ - for API parameter/return/compatibility details
references/api/
本技能的结构与官方uni-app-x组件和API文档保持一致:
-
选择组件或API分类:
- 组件 →
examples/components/built-in/ - API → (按领域分类)
examples/api/
- 组件 →
-
打开对应的示例文件:
- 每个组件或API都有独立的示例文件
- 每个示例都包含官方文档URL
- 示例与官方文档中的示例保持一致
-
需要完整规范时参考参考文档:
- 内置组件参考 →
references/components/built-in/ - API参数/返回值/兼容性细节参考 →
references/api/
- 内置组件参考 →
Examples and References
示例与参考文档
Components (Built-in)
内置组件
- Examples:
examples/components/built-in/*.md - References:
references/components/built-in/*.md - Official docs: https://doc.dcloud.net.cn/uni-app-x/component/
- 示例:
examples/components/built-in/*.md - 参考文档:
references/components/built-in/*.md - 官方文档:https://doc.dcloud.net.cn/uni-app-x/component/
APIs
APIs
- Examples:
examples/api/{category}/*.md - References:
references/api/*.md - Official docs: https://doc.dcloud.net.cn/uni-app-x/api/
- 示例:
examples/api/{category}/*.md - 参考文档:
references/api/*.md - 官方文档:https://doc.dcloud.net.cn/uni-app-x/api/
Best Practices
最佳实践
- One file per component/API: Each component and API has an independent example file with official doc link.
- Follow platform compatibility: Check the compatibility section in each example/reference.
- Use conditional compilation: Use /
#ifdeffor platform-specific logic.#endif - Keep examples aligned: Use the official documentation examples as the source of truth.
- Prefer references for specs: Use for full parameter tables and compatibility.
references/
- 单组件/单API对应单个文件:每个组件和API都有独立的示例文件,并附带官方文档链接。
- 遵循平台兼容性:查看每个示例/参考文档中的兼容性章节。
- 使用条件编译:针对平台特定逻辑使用/
#ifdef。#endif - 示例与官方保持一致:以官方文档中的示例为标准。
- 规范参考优先使用参考文档:如需完整的参数表和兼容性信息,请使用目录下的内容。
references/
Resources
资源
- Components: https://doc.dcloud.net.cn/uni-app-x/component/
- APIs: https://doc.dcloud.net.cn/uni-app-x/api/
- uni-app-x: https://doc.dcloud.net.cn/uni-app-x/
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, 官方文档