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

feat(Upload): support mix mediaType #5690

Merged
merged 1 commit into from
Jan 15, 2024

Conversation

johnsonwong666
Copy link
Collaborator

#5675
当medieType 存在 'mix'时,formatMedia函数的入参res的type值会是mix。type改成当前项item的fileType准确判断是image还是video,后续走进isImageFile/isVideoFile的判断,通过了这两项判断才能在模板上显示。

@@ -244,7 +244,7 @@ uploadFilePromise(fileName, chooseResult) {
| camera | 当 accept 为 `video` \| `media` 时生效,可选值为 `back` `front` | _string_ | - |
| compressed | 当 accept 为 `video` 时生效,是否压缩视频,默认为`true` | _boolean_ | - |
| max-duration | 当 accept 为 `video` \| `media` 时生效,拍摄视频最长拍摄时间,单位秒 | _number_ | `60` |
| media-type `v1.10.8` | 当 accept 为 `media` 时生效,选择的文件的文件类型,可选值为 `image` `video` | _string[]_ | `['image', 'video']` |
| media-type `v1.10.8` | 当 accept 为 `media` 时生效,选择的文件的文件类型,可选值为 `image` `video` `mix` | _string[]_ | `['image', 'video', 'mix']` |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个 mix 是啥

@landluck landluck changed the title fix(Upload): fix formateRes when mediaType is mix feat(Upload): support mix mediaType Jan 15, 2024
@landluck landluck merged commit d1f505b into youzan:dev Jan 15, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants