📜  文件选择器电子 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:04:30.542000             🧑  作者: Mango

代码示例1
const {dialog} = require('electron').remote;

document.querySelector('#selectBtn').addEventListener('click', function (event) {
    dialog.showOpenDialog({
        properties: ['openFile', 'multiSelections']
    }, function (files) {
        if (files !== undefined) {
            // handle files
        }
    });
});