大前端 electronnodejs electron 防止多开代码 2021-09-29 · 3902 这么一点: const gotTheLock = app.requestSingleInstanceLock() if (!gotTheLock) { app.quit() }