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

fix(h5): 在同一页面多次chooseImage时,更新multiple属性 #8485

Merged
merged 9 commits into from
Feb 9, 2021
6 changes: 6 additions & 0 deletions packages/taro-h5/src/api/image/chooseImage.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,12 @@ const chooseImage = function (options) {
obj.setAttribute('style', 'position: fixed; top: -4000px; left: -3000px; z-index: -300;')
document.body.appendChild(obj)
taroChooseImageId = document.getElementById(imageId)
} else {
if (count > 1) {
taroChooseImageId.setAttribute('multiple', 'multiple')
} else {
taroChooseImageId.removeAttribute('multiple')
}
}
let taroChooseImageCallback
const taroChooseImagePromise = new Promise(resolve => {
Expand Down