我正在开发一个可以打开目录文件选择器并返回一个值的电子应用程序,就像这个问题是如何做到的:Electron - Open Folder Dialog
ipcMain.on('selectDirectory', function() {
dir = dialog.showOpenDialog(mainWindow, {
properties: ['openDirectory']
});
});
但是我找不到打开文件夹对话框而不返回任何内容的方法,就像我作为用户想要打开文件的位置一样。我不想通过等待选定的文件/文件夹来锁定我的程序。我只想通过我的跨平台电子应用程序(mac/win/linux)在用户机器上打开一个特定位置的窗口