Skip to content

Commit

Permalink
fix(useFileDialog): choose file not work on mobile (#2080)
Browse files Browse the repository at this point in the history
Co-authored-by: Anthony Fu <anthonyfu117@hotmail.com>
  • Loading branch information
1SZX1 and antfu committed Sep 5, 2022
1 parent 3c642b7 commit c463ab7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/core/useFileDialog/index.ts
@@ -1,3 +1,4 @@
import { hasOwn } from '@vueuse/shared'
import { type Ref, readonly, ref } from 'vue-demi'
import type { ConfigurableDocument } from '../_configurable'
import { defaultDocument } from '../_configurable'
Expand Down Expand Up @@ -63,7 +64,8 @@ export function useFileDialog(options: UseFileDialogOptions = {}): UseFileDialog
}
input.multiple = _options.multiple!
input.accept = _options.accept!
input.capture = _options.capture!
if (hasOwn(_options, 'capture'))
input.capture = _options.capture!

input.click()
}
Expand Down

0 comments on commit c463ab7

Please sign in to comment.