Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. 🗂️ Base branches to auto review (2)
Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Tip Try Coding Plans. Let us write the prompt for your AI agent so you can ship faster (with fewer bugs). 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. Comment |
| } | ||
| if (Taro.getEnv() === 'WEB') { | ||
| const el = document.getElementById('taroChooseImage') | ||
| const el = document.getElementById('taroChooseFile') |
There was a problem hiding this comment.
这个判断可以加一条限制:比如是否使用 自定义上传功能 类似这样的属性,
目标是:即满足原 taro 的上传逻辑、保障规范的一致性;又可以满足自定义上传逻辑。
xiaoyatong
left a comment
There was a problem hiding this comment.
可以增加一个属性,用于是否自定义上传,以区别taro规范。
需要补充文档、demo和单测~~
| } | ||
| if (Taro.getEnv() === 'WEB') { | ||
| const el = document.getElementById('taroChooseImage') | ||
| if (Taro.getEnv() === 'WEB' && needchooseFile) { |
🤔 这个变动的性质是?
🔗 相关 Issue
升级NutUI时,Taro版本编译为H5端上传组件无法支持文件类型的选择,排查问题后是Taro底层chooseImageAPI根据小程序的规范,无法支持这一能力。
💡 需求背景和解决方案
1.Taro版本上传组件在H5端支持文件类型选择
2、针对web环境封装chooseFileAPI,不再依赖于TaroAPI
3、不涉及UI改动
☑️ 请求合并前的自查清单