" window.frame.openDialog"无法在Mac OS X中选择文件 [英] "window.frame.openDialog" not able select files in Mac OS X

查看:100
本文介绍了" window.frame.openDialog"无法在Mac OS X中选择文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用 window.frame.openDialog ,我无法从打开对话框中选择文件 Mac OS X 。我可以选择目录但不能选择文件。有没有办法选择文件?

Using window.frame.openDialog, I am not able to select the files from the Open dialog box in Mac OS X. I could select the directory but not the files. Is there any way to select the files?

我的代码是:

window.frame.openDialog({
  type: 'open',
  title: 'Open...',
  multiSelect: false,
  acceptTypes: {
    'Images': ['*.hwc']
  },
  dirSelect: false,
  initialValue: '/'
});


推荐答案

在MAC中,无法使用<选择文件strong> window.frame.openDialog ,而不是您可以使用 fs.readFile 搜索并选择文件。

In MAC it is not possible to select files using window.frame.openDialog, instead of you can search and select file using fs.readFile.

这篇关于&QUOT; window.frame.openDialog&QUOT;无法在Mac OS X中选择文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆