Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wd-upload 在ios 系统上(iphone)上打不开选择文件的对话框 ,无效 #227

Closed
BeginnerDone opened this issue Apr 8, 2024 · 10 comments
Labels

Comments

@BeginnerDone
Copy link
Contributor

Wot Design Uni 版本号

1.2.12

平台

微信小程序

重现链接

https://wot-design-uni.gitee.io/component/upload.html

重现步骤

使用iphone 打开wot-design-uni微信小程序 upload组件

期望的结果是什么?

打开,上传图片

实际的结果是什么?

没有反应

环境信息

No response

其他补充信息

No response

@BeginnerDone BeginnerDone added the 🐞bug: need confirm 待确认的bug label Apr 8, 2024
@Moonofweisheng
Copy link
Owner

Moonofweisheng commented Apr 8, 2024 via email

@BeginnerDone
Copy link
Contributor Author

隐私协议是否已经配置,可以看看组件库demo的微信小程序是否有复现。

---原始邮件--- 发件人: @.> 发送时间: 2024年4月8日(周一) 下午5:24 收件人: @.>; 抄送: @.>; 主题: [Moonofweisheng/wot-design-uni] wd-upload 在ios 系统上(iphone)上打不开选择文件的对话框 ,无效 (Issue #227) Wot Design Uni 版本号 1.2.12 平台 微信小程序 重现链接 https://wot-design-uni.gitee.io/component/upload.html 重现步骤 使用iphone 打开wot-design-uni微信小程序 upload组件 期望的结果是什么? 打开,上传图片 实际的结果是什么? 没有反应 环境信息 No response 其他补充信息 No response — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you are subscribed to this thread.Message ID: @.>

找到原因了,选择相册报错了:chooseImage:unknown scene ,好像是微信官方的bug,我测试了下,把sourceType注释确实可以了。

@BeginnerDone
Copy link
Contributor Author

那这个定位到问题了,该怎么办呢,你这边要不要抛出一个参数来控制sourceType是否传递呢?

@Moonofweisheng
Copy link
Owner

Moonofweisheng commented Apr 8, 2024 via email

@BeginnerDone
Copy link
Contributor Author

sourceType只要传了,无论传什么都不行,是吗

------------------ 原始邮件 ------------------ 发件人: @.>; 发送时间: 2024年4月8日(星期一) 下午5:54 收件人: @.>; 抄送: @.>; @.>; 主题: Re: [Moonofweisheng/wot-design-uni] wd-upload 在ios 系统上(iphone)上打不开选择文件的对话框 ,无效 (Issue #227) 那这个定位到问题了,该怎么办呢,你这边要不要抛出一个参数来控制sourceType是否传递呢? — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>

具体没测,我待会测试下看看,另外我看Dcloud官网上 微信小程序从基础库 2.21.0 开始, wx.chooseImage 停止维护,请使用 uni.chooseMedia 代替。不知道是不是替换就没有这个·问题了,后面我会测试下看看。

@Moonofweisheng
Copy link
Owner

Moonofweisheng commented Apr 8, 2024 via email

@BeginnerDone
Copy link
Contributor Author

感谢,如果传[]或者传null可以避免这个问题的话,可以调整props的类型支持兼容这个问题,如果不行的话就只能在微信小程序平台调整API到chooseMedia了

------------------ 原始邮件 ------------------ 发件人: @.>; 发送时间: 2024年4月8日(星期一) 晚上6:06 收件人: @.>; 抄送: @.>; @.>; 主题: Re: [Moonofweisheng/wot-design-uni] wd-upload 在ios 系统上(iphone)上打不开选择文件的对话框 ,无效 (Issue #227) sourceType只要传了,无论传什么都不行,是吗 … ------------------ 原始邮件 ------------------ 发件人: @.>; 发送时间: 2024年4月8日(星期一) 下午5:54 收件人: @.>; 抄送: @.>; @.>; 主题: Re: [Moonofweisheng/wot-design-uni] wd-upload 在ios 系统上(iphone)上打不开选择文件的对话框 ,无效 (Issue #227) 那这个定位到问题了,该怎么办呢,你这边要不要抛出一个参数来控制sourceType是否传递呢? — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.> 具体没测,我待会测试下看看,另外我看Dcloud官网上 微信小程序从基础库 2.21.0 开始, wx.chooseImage 停止维护,请使用 uni.chooseMedia 代替。不知道是不是替换就没有这个·问题了,后面我会测试下看看。 — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.>

必须为sourceType 显式的指定值:sourceType="['camera','album']" 或者其中一个方式就没问题了,反正就是不能默认[ ],我们这边如果不传值,你那边是默认传递[ ],但是对于uniapp 怎么处理你传递的[ ] 就不知道了,github上没找到这部分源码 ,所以是否可以你那边就直接默认['camera','album'],因为就Dcloud 上的而言,他如果不传,默认就是['camera','album']。

@Moonofweisheng
Copy link
Owner

Moonofweisheng commented Apr 8, 2024 via email

@BeginnerDone
Copy link
Contributor Author

好的,感谢

@Moonofweisheng Moonofweisheng added 🐞bug bug and removed 🐞bug: need confirm 待确认的bug labels Apr 8, 2024
Copy link

此 issue 已被自动锁定,因为关闭后没有任何近期活动。如果有相关 bug,请重新创建一个新 issue。

@github-actions github-actions bot locked and limited conversation to collaborators Jul 17, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants