From e1a9796363ca3b93950f5e8f5637fa3a04b3ca38 Mon Sep 17 00:00:00 2001 From: AFTM7512 Date: Tue, 19 May 2020 14:09:15 +0800 Subject: [PATCH] =?UTF-8?q?add-=E5=A2=9E=E5=8A=A0console?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.js | 6 +++--- package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/main.js b/main.js index a99042f..adab1da 100644 --- a/main.js +++ b/main.js @@ -59,7 +59,7 @@ function createWindow () { // 部分 API 在 ready 事件触发后才能使用。 app.on('ready', () => { createWindow() - // registerShortcut() // 注册快捷键 + registerShortcut() // 注册快捷键 autoUpdata() // 自动更新 setContextmenu(win.webContents) // 设置右击菜单 isDomReady(win.webContents) // 刷新后 dom 加载完成执行的事件 @@ -128,12 +128,12 @@ function behindInstanceJavaScript(contents) { /** 注册快捷键 */ function registerShortcut() { - globalShortcut.register('CommandOrControl+I', () => { + globalShortcut.register('CommandOrControl+P', () => { // 打开开发者工具 win.webContents.openDevTools() }) - if (!globalShortcut.isRegistered('CommandOrControl+I')) { + if (!globalShortcut.isRegistered('CommandOrControl+P')) { globalShortcut.register('CommandOrControl+P', () => { // 打开开发者工具 win.webContents.openDevTools() diff --git a/package.json b/package.json index 0590108..edd5ca3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "tingkelai-electron", - "version": "1.0.8", + "version": "1.0.9", "description": "听客来PC客户端", "main": "main.js", "author": "南京听客来信息技术有限公司",