From 9251ef0c7fcf2756366b7e693045b36d711ff5a9 Mon Sep 17 00:00:00 2001 From: kongwh Date: Wed, 28 Jun 2023 16:59:09 +0800 Subject: [PATCH] =?UTF-8?q?fix(h5):=20chooseMedia=20=E6=9D=A5=E6=BA=90?= =?UTF-8?q?=E5=90=8C=E6=97=B6=E5=8C=85=E5=90=AB=20album=20=E5=92=8C=20came?= =?UTF-8?q?ra=20=E6=97=B6=EF=BC=8C=E4=BA=8C=E8=80=85=E9=83=BD=E4=BC=9A?= =?UTF-8?q?=E7=9B=B4=E6=8E=A5=E6=89=93=E5=BC=80=E7=9B=B8=E6=9C=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/taro-h5/src/api/media/video/chooseMedia.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/taro-h5/src/api/media/video/chooseMedia.ts b/packages/taro-h5/src/api/media/video/chooseMedia.ts index 21d16c440b4b..f7ed8aef575c 100644 --- a/packages/taro-h5/src/api/media/video/chooseMedia.ts +++ b/packages/taro-h5/src/api/media/video/chooseMedia.ts @@ -71,7 +71,7 @@ export const chooseMedia = async function ( const { tapIndex } = await showActionSheet({ itemList: ['拍摄', '从相册选择'], }, methodName) - sourceType.splice(0, 1, tapIndex === 0 ? 'camera' : 'album') + sourceType.splice(0, sourceType.length, tapIndex === 0 ? 'camera' : 'album') } catch (e) { return handle.fail({ errMsg: e.errMsg?.replace('^.*:fail ', '')