摘要:
封装公共窗口 class AppWindow extends BrowserWindow { constructor(config,fileLocation){ const baseConfig = { width: 800, height: 600, webPreferences: { nodeI 阅读全文
posted @ 2022-01-30 17:06
13522679763-任国强
阅读(26)
评论(0)
推荐(0)
摘要:
// 自动打开调试窗口 mainWindow.webContents.openDevTools() 阅读全文
posted @ 2022-01-30 09:02
13522679763-任国强
阅读(25)
评论(0)
推荐(0)
摘要:
npm i nodemon --save-dev 修改启动命令 "scripts": { "start": " nodemon --watch main.js --exec electron ." }, 阅读全文
posted @ 2022-01-30 09:02
13522679763-任国强
阅读(39)
评论(0)
推荐(0)
摘要:
// 打开外部跳转链接 var { shell } = require('electron') var aHref = this.document.querySelector('#aHref') aHref.onclick = function(e){ e.preventDefault() var 阅读全文
posted @ 2022-01-30 09:01
13522679763-任国强
阅读(40)
评论(0)
推荐(0)
摘要:
const {remote} = require('electron') var rightTemplate = [ { label:"粘贴" , accelerator:'ctrl+c', // 增加快捷键 }, { label:"复制", accelerator:'ctrl+v', // 增加快 阅读全文
posted @ 2022-01-30 09:01
13522679763-任国强
阅读(76)
评论(0)
推荐(0)
摘要:
底部通知消息 <body> <button id="notifyBtn">通知消息</button> </body> <script> var notifyBtn = document.getElementById('notifyBtn') var option = { title:'小二,来订单了 阅读全文
posted @ 2022-01-30 09:00
13522679763-任国强
阅读(14)
评论(0)
推荐(0)
摘要:
// 绑定全局快捷键 globalShortcut.register('ctrl+e',()=>{ mainWindow.loadURL('http://baidu.com/') }) // 判断是否绑定快捷键 let isRegister = globalShortcut.isRegistered 阅读全文
posted @ 2022-01-30 08:59
13522679763-任国强
阅读(142)
评论(0)
推荐(0)
摘要:
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="wi 阅读全文
posted @ 2022-01-30 08:58
13522679763-任国强
阅读(26)
评论(0)
推荐(0)

浙公网安备 33010602011771号