document.addEventListener('DOMContentLoaded', () => {
$('select-new-location').addEventListener('click', () => {
remote.dialog.showOpenDialog({
properties: ['openDirectory'],
message: '选择文件的储存路径'
}, (path) => {
console.log(path)
})
})
})
以上是测试代码
以下是报错信息
objc[4873]: Class FIFinderSyncExtensionHost is implemented in both /System/Library/PrivateFrameworks/FinderKit.framework/Versions/A/FinderKit (0x7fffa87fb3d8) and /System/Library/PrivateFrameworks/FileProvider.framework/OverrideBundles/FinderSyncCollaborationFileProviderOverride.bundle/Contents/MacOS/FinderSyncCollaborationFileProviderOverride (0x11b341f50). One of the two will be used. Which one is undefined.
查询说是mac自己的问题,希望老师能帮忙确定一下
https://github.com/sqweek/dialog/issues/24