feat: ✨ 提供 useUpload 用于便捷上传 - #969
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Walkthrough本次修改新增了一个用于处理文件上传的 composable 函数 Changes
Sequence Diagram(s)sequenceDiagram
participant U as 用户
participant C as 上传组件
participant ULU as useUpload Composable
participant API as uni.uploadFile
U ->> C: 触发文件上传
C ->> ULU: 调用 startUpload(file, options)
ULU ->> API: 调用上传 API
API -->> ULU: 返回任务实例与上传状态
ULU -->> C: 更新状态、进度与回调
U ->> C: 触发取消上传
C ->> ULU: 调用 abort()
ULU ->> API: 取消正在进行的上传任务
Possibly related PRs
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (3)
🧰 Additional context used🧬 Code Definitions (1)src/uni_modules/wot-design-uni/components/composables/useUpload.ts (1)
⏰ Context from checks skipped due to timeout of 90000ms (1)
🔇 Additional comments (14)
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Walkthrough此PR引入了一个新的 Changes
|
✅ Deploy Preview for wot-design-uni ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
🤔 这个 PR 的性质是?(至少选择一个)
🔗 相关 Issue
💡 需求背景和解决方案
从
upload中抽离出useUpload用于便捷上传☑️ 请求合并前的自查清单
Summary by CodeRabbit