Skip to content

Commit

Permalink
fix(h5): 为chooseImage新增imageId (#3109)
Browse files Browse the repository at this point in the history
  • Loading branch information
yanguoyu authored and luckyadam committed May 21, 2019
1 parent d8474ab commit e8cf6ae
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/taro-h5/src/api/image/chooseImage.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export default function chooseImage (options) {
return Promise.reject(res)
}

const { count = 1, success, fail, complete } = options
const { count = 1, success, fail, complete, imageId = 'taroChooseImage' } = options
const res = {
errMsg: 'chooseImage:ok',
tempFilePaths: [],
Expand All @@ -29,7 +29,7 @@ export default function chooseImage (options) {
return Promise.reject(res)
}

let taroChooseImageId = document.getElementById('taroChooseImage')
let taroChooseImageId = document.getElementById(imageId)
if (!taroChooseImageId) {
let obj = document.createElement('input')
obj.setAttribute('type', 'file')
Expand Down

0 comments on commit e8cf6ae

Please sign in to comment.