![](https://img-blog.csdnimg.cn/20201014180756780.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
electron
xing2233
xing8901@foxmail.com
展开
-
electron修改镜像解决国内安装慢问题
npm config set registry https://registry.npm.taobao.org/ npm config set ELECTRON_MIRROR http://npm.taobao.org/mirrors/electron/原创 2021-03-03 18:17:17 · 1034 阅读 · 1 评论 -
ipcMain 同步消息,主进程不返回消息会导致进程卡死
主进程 ipcMain.on('synchronous-message', (event, arg) => { console.log(arg) // prints "ping" event.returnValue = 'pong' // 不返回消息会导致进程卡死 }) 渲染进程 ipcRenderer.on('asynchronous-reply', (event, arg) => { console.log(arg) // prints "pong" }) ipcRendere原创 2021-03-03 18:16:46 · 1441 阅读 · 2 评论 -
electron shell.writeShortcutLink 示例
doc shell.writeShortcutLink(shortcutPath[, operation], options) Windows 在shortcutPath位置创建或更新一个快捷连接,返回 Boolean - 快捷方式是否被成功创建。 shortcutPath String operation String (optional) - Default is create, can be one of following: create - 创建一个新的快捷方式, 如有必要可以覆盖。 up原创 2021-03-03 18:15:49 · 507 阅读 · 1 评论 -
electron+vue 环境配置
安装vue脚手架 npm install -g @vue/cli 创建vue项目 vue create electron-vue-demo 安装electron vue add electron-builder原创 2021-03-03 18:15:22 · 343 阅读 · 1 评论 -
electron+vue集成环境组件内导入 electron/node 模块的几种方法
通过 vue-cli-plugin-electron-builder 集成的 electron 环境 background.js webPreferences: { // webSecurity: false,// 取消跨域限制 enableRemoteModule: true, // 取消 Remote 模块警告 nodeIntegration: true // 是否集成 Nodejs } vue 组件 const { ipcRenderer, remote } = window.req.转载 2021-03-03 18:13:27 · 1783 阅读 · 1 评论