mirror of
https://github.com/ialley-workshop-open/uni-halo.git
synced 2026-09-13 00:50:40 +08:00
14 KiB
14 KiB
uni-app 技能与官方文档对应核对清单
核对目标
确保所有 uni-app 相关技能与官方文档一一对应,每个组件和 API 都有独立的示例文件,包含原文档地址和官网全部示例。
官方文档参考
- 组件文档: https://uniapp.dcloud.net.cn/component/
- API 文档: https://uniapp.dcloud.net.cn/api/
- uni-app-x 组件: https://doc.dcloud.net.cn/uni-app-x/component/
- uni-app-x API: https://doc.dcloud.net.cn/uni-app-x/api/
核对任务清单
1. uni-app 内置组件核对
视图容器组件
- view - ✅ 已有文档 + ✅ 已创建示例文件
examples/components/built-in/view.md - scroll-view - ✅ 已有文档 + ✅ 已创建示例文件
examples/components/built-in/scroll-view.md - swiper - ✅ 已有文档 + ✅ 已创建示例文件
examples/components/built-in/swiper.md - match-media - ✅ 已有文档
- movable-area - ✅ 已有文档
- movable-view - ✅ 已有文档
- cover-view - ✅ 已有文档
- cover-image - ✅ 已有文档
基础内容组件
- icon - ✅ 已有文档 + ✅ 已创建示例文件
examples/components/built-in/icon.md - text - ✅ 已有文档 + ✅ 已创建示例文件
examples/components/built-in/text.md - rich-text - ✅ 已有文档 + ✅ 已创建示例文件
examples/components/built-in/rich-text.md - progress - ✅ 已有文档 + ✅ 已创建示例文件
examples/components/built-in/progress.md
表单组件
- button - ✅ 已有文档 + ✅ 已创建示例文件
examples/components/built-in/button.md - checkbox - ✅ 已有文档 + ✅ 已创建示例文件
examples/components/built-in/checkbox.md - editor - ✅ 已有文档
- form - ✅ 已有文档 + ✅ 已创建示例文件
examples/components/built-in/form.md - input - ✅ 已有文档 + ✅ 已创建示例文件
examples/components/built-in/input.md - label - ✅ 已有文档 + ✅ 已创建示例文件
examples/components/built-in/label.md - picker - ✅ 已有文档 + ✅ 已创建示例文件
examples/components/built-in/picker.md - picker-view - ✅ 已有文档
- radio - ✅ 已有文档 + ✅ 已创建示例文件
examples/components/built-in/radio.md - slider - ✅ 已有文档 + ✅ 已创建示例文件
examples/components/built-in/slider.md - switch - ✅ 已有文档 + ✅ 已创建示例文件
examples/components/built-in/switch.md - textarea - ✅ 已有文档 + ✅ 已创建示例文件
examples/components/built-in/textarea.md
导航组件
- navigator - ✅ 已有文档 + ✅ 已创建示例文件
examples/components/built-in/navigator.md
媒体组件
- audio - ✅ 已有文档 + ✅ 已创建示例文件
examples/components/built-in/audio.md - camera - ✅ 已有文档 + ✅ 已创建示例文件
examples/components/built-in/camera.md - image - ✅ 已有文档 + ✅ 已创建示例文件
examples/components/built-in/image.md - video - ✅ 已有文档 + ✅ 已创建示例文件
examples/components/built-in/video.md - live-player - ✅ 已有文档
- live-pusher - ✅ 已有文档
其他组件
- map - ✅ 已有文档 + ✅ 已创建示例文件
examples/components/built-in/map.md - canvas - ✅ 已有文档 + ✅ 已创建示例文件
examples/components/built-in/canvas.md - web-view - ✅ 已有文档 + ✅ 已创建示例文件
examples/components/built-in/web-view.md - ad - ✅ 已有文档
- ad-draw - ✅ 已有文档
- custom-tab-bar - ✅ 已有文档
- navigation-bar - ✅ 已有文档
- page-meta - ✅ 已有文档
- unicloud-db - ✅ 已有文档
状态: ✅ 所有内置组件(40个)已有文档
2. uni-ui 扩展组件核对
状态: ✅ 所有 uni-ui 组件(44个)已有文档
3. uni-app API 核对
网络请求 API
- uni.request - ✅ 已创建示例文件
examples/api/network/request.md - uni.uploadFile - ✅ 已创建示例文件
examples/api/network/upload-file.md - uni.downloadFile - ✅ 已创建示例文件
examples/api/network/download-file.md - uni.connectSocket
- uni.onSocketOpen
- uni.onSocketError
- uni.sendSocketMessage
- uni.onSocketMessage
- uni.closeSocket
- uni.onSocketClose
数据存储 API
- uni.setStorage - ✅ 已创建示例文件
examples/api/storage/set-storage.md - uni.setStorageSync - ✅ 已创建示例文件
examples/api/storage/set-storage-sync.md - uni.getStorage - ✅ 已创建示例文件
examples/api/storage/get-storage.md - uni.getStorageSync - ✅ 已创建示例文件
examples/api/storage/get-storage-sync.md - uni.getStorageInfo - ✅ 已创建示例文件
examples/api/storage/get-storage-info.md - uni.getStorageInfoSync
- uni.removeStorage - ✅ 已创建示例文件
examples/api/storage/remove-storage.md - uni.removeStorageSync
- uni.clearStorage - ✅ 已创建示例文件
examples/api/storage/clear-storage.md - uni.clearStorageSync
设备信息 API
- uni.getSystemInfo - ✅ 已创建示例文件
examples/api/device/get-system-info.md - uni.getSystemInfoSync
- uni.getNetworkType - ✅ 已创建示例文件
examples/api/device/get-network-type.md - uni.onNetworkStatusChange
- uni.getBatteryInfo - ✅ 已创建示例文件
examples/api/device/get-battery-info.md - uni.getBatteryInfoSync
- uni.setScreenBrightness - ✅ 已创建示例文件
examples/api/device/set-screen-brightness.md - uni.getScreenBrightness - ✅ 已创建示例文件
examples/api/device/get-screen-brightness.md - uni.setKeepScreenOn
界面交互 API
- uni.showToast - ✅ 已创建示例文件
examples/api/ui/show-toast.md - uni.showLoading - ✅ 已创建示例文件
examples/api/ui/show-loading.md - uni.hideToast - ✅ 已创建示例文件
examples/api/ui/hide-toast.md - uni.hideLoading - ✅ 已创建示例文件
examples/api/ui/hide-loading.md - uni.showModal - ✅ 已创建示例文件
examples/api/ui/show-modal.md - uni.showActionSheet - ✅ 已创建示例文件
examples/api/ui/show-action-sheet.md - uni.setNavigationBarTitle - ✅ 已创建示例文件
examples/api/ui/set-navigation-bar-title.md - uni.setNavigationBarColor - ✅ 已创建示例文件
examples/api/ui/set-navigation-bar-color.md - uni.showNavigationBarLoading - ✅ 已创建示例文件
examples/api/ui/show-navigation-bar-loading.md - uni.hideNavigationBarLoading - ✅ 已创建示例文件
examples/api/ui/hide-navigation-bar-loading.md - uni.setTabBarBadge - ✅ 已创建示例文件
examples/api/ui/set-tab-bar-badge.md - uni.removeTabBarBadge - ✅ 已创建示例文件
examples/api/ui/remove-tab-bar-badge.md - uni.showTabBarRedDot - ✅ 已创建示例文件
examples/api/ui/show-tab-bar-red-dot.md - uni.hideTabBarRedDot - ✅ 已创建示例文件
examples/api/ui/hide-tab-bar-red-dot.md - uni.setTabBarStyle - ✅ 已创建示例文件
examples/api/ui/set-tab-bar-style.md - uni.setTabBarItem
位置服务 API
- uni.getLocation - ✅ 已创建示例文件
examples/api/location/get-location.md - uni.openLocation - ✅ 已创建示例文件
examples/api/location/open-location.md - uni.chooseLocation - ✅ 已创建示例文件
examples/api/location/choose-location.md
媒体处理 API
- uni.chooseImage - ✅ 已创建示例文件
examples/api/media/choose-image.md - uni.previewImage - ✅ 已创建示例文件
examples/api/media/preview-image.md - uni.getImageInfo - ✅ 已创建示例文件
examples/api/media/get-image-info.md - uni.saveImageToPhotosAlbum - ✅ 已创建示例文件
examples/api/media/save-image-to-photos-album.md - uni.chooseVideo - ✅ 已创建示例文件
examples/api/media/choose-video.md - uni.saveVideoToPhotosAlbum
- uni.chooseMedia - ✅ 已创建示例文件
examples/api/media/choose-media.md - uni.chooseFile
页面路由 API
- uni.navigateTo - ✅ 已创建示例文件
examples/api/navigation/navigate-to.md - uni.redirectTo - ✅ 已创建示例文件
examples/api/navigation/redirect-to.md - uni.reLaunch - ✅ 已创建示例文件
examples/api/navigation/re-launch.md - uni.switchTab - ✅ 已创建示例文件
examples/api/navigation/switch-tab.md - uni.navigateBack - ✅ 已创建示例文件
examples/api/navigation/navigate-back.md
文件操作 API
- uni.saveFile - ✅ 已创建示例文件
examples/api/file/save-file.md - uni.getFileInfo - ✅ 已创建示例文件
examples/api/file/get-file-info.md - uni.getSavedFileList - ✅ 已创建示例文件
examples/api/file/get-saved-file-list.md - uni.getSavedFileInfo
- uni.removeSavedFile
支付 API
- uni.requestPayment
分享 API
- uni.share
其他 API
- uni.canIUse
- uni.getProvider
- uni.login
- uni.getUserInfo
- uni.checkSession
- uni.authorize
- uni.openSetting
- uni.getSetting
状态: 🔄 进行中 - 已创建部分 API 独立示例文件(request.md, set-storage.md, get-storage.md, show-toast.md, show-modal.md, show-loading.md, navigate-to.md, navigate-back.md, choose-image.md, preview-image.md, get-location.md, get-system-info.md),需要继续创建其他 API 示例文件
4. uni-app-x 组件和 API 核对
状态: ❌ 需要创建完整的 uni-app-x 组件和 API 文档
5. 文档完整性检查
每个组件文档应包含
- 组件概述
- 所有属性说明(类型、默认值、说明)
- 所有事件说明
- 插槽说明(如果有)
- 平台兼容性表格
- 使用示例(基础用法)
- 更多示例(官网全部示例)
- 官方文档链接
每个 API 文档应包含
- API 概述
- 参数说明
- 返回值说明
- 平台兼容性
- 使用示例
- 官方文档链接
更新任务
优先级 1: 为每个 API 创建独立示例文件
任务: 在 examples/api/ 目录下为每个 API 创建独立的示例文件
进度:
- ✅ 已创建:
examples/api/network/request.md - ✅ 已创建:
examples/api/storage/set-storage.md - ✅ 已创建:
examples/api/ui/show-toast.md - ✅ 已创建:
examples/api/navigation/navigate-to.md - ✅ 已创建:
examples/api/navigation/navigate-back.md - ✅ 已创建:
examples/api/media/choose-image.md - ✅ 已创建:
examples/api/media/preview-image.md - ✅ 已创建:
examples/api/location/get-location.md - ✅ 已创建:
examples/api/device/get-system-info.md - ✅ 已创建:
examples/api/storage/get-storage.md - ✅ 已创建:
examples/api/ui/show-modal.md - ✅ 已创建:
examples/api/ui/show-loading.md - ⏳ 待创建: 其他所有 API 示例文件(约40+个)
需要创建的目录结构:
examples/
├── api/
│ ├── network/
│ │ ├── request.md ✅
│ │ ├── upload-file.md ⏳
│ │ ├── download-file.md ⏳
│ │ └── websocket.md ⏳
│ ├── storage/
│ │ ├── set-storage.md ✅
│ │ ├── get-storage.md ⏳
│ │ └── ... ⏳
│ ├── device/ ⏳
│ ├── ui/
│ │ ├── show-toast.md ✅
│ │ └── ... ⏳
│ ├── location/ ⏳
│ ├── media/ ⏳
│ ├── navigation/ ⏳
│ ├── file/ ⏳
│ ├── payment/ ⏳
│ ├── share/ ⏳
│ └── other/ ⏳
优先级 2: 为每个内置组件创建独立示例文件
任务: 在 examples/components/built-in/ 目录下为每个内置组件创建独立的示例文件
进度:
- ✅ 已创建:
examples/components/built-in/view.md - ✅ 已创建:
examples/components/built-in/scroll-view.md - ✅ 已创建:
examples/components/built-in/swiper.md - ✅ 已创建:
examples/components/built-in/text.md - ✅ 已创建:
examples/components/built-in/button.md - ✅ 已创建:
examples/components/built-in/input.md - ✅ 已创建:
examples/components/built-in/image.md - ⏳ 待创建: 其他33个内置组件示例文件
当前进度统计:
- API 示例文件: 47/50+ (约94%)
- 组件示例文件: 25/40 (62.5%)
需要创建的目录结构:
examples/
├── components/
│ ├── built-in/
│ │ ├── view.md ✅
│ │ ├── scroll-view.md ⏳
│ │ ├── swiper.md ⏳
│ │ └── ... (其他37个组件) ⏳
优先级 3: 创建 uni-app-x 完整文档
任务: 为 uniappx-project 创建完整的组件和 API 文档
需要创建的目录结构:
uniappx-project/
├── examples/
│ ├── components/
│ │ └── ... (所有 uni-app-x 组件)
│ └── api/
│ └── ... (所有 uni-app-x API)
├── api/
│ └── ... (API 参考文档)
└── templates/
优先级 4: 验证所有文档链接
任务: 检查所有组件和 API 文档中的官方文档链接是否正确
优先级 5: 补充缺失的 API
任务: 检查官方文档,找出所有 API,确保没有遗漏
核对进度
- 内置组件文档完整性检查
- uni-ui 组件文档完整性检查
- API 文档完整性检查
- 每个 API 独立示例文件检查
- 每个组件独立示例文件检查
- uni-app-x 文档完整性检查
- 官方文档链接验证
下一步行动
- 先完成 API 独立示例文件的创建
- 再完成内置组件独立示例文件的创建
- 最后完成 uni-app-x 完整文档的创建