window.addEventListener('DOMContentLoaded', () => { let btnQuit = document.getElementById('btn-electron-quit'); btnQuit.addEventListener('click', () => { window.electronAPI.userExit('确认退出当前系统?') console.log('退出') }) });