随笔 - 45,  文章 - 0,  评论 - 2,  阅读 - 30144

随笔分类 -  electron

Electron安装慢
摘要:打开 cmd,输入 npm config edit 打开 .npmrc 文件 文件顶部设置 registry=xxx 下增加一行:electron_mirror=https://cdn.npm.taobao.org/dist/electron/ ;;;; ; npm userconfig file 阅读全文
posted @ 2022-05-18 22:46 W1N9s 阅读(36) 评论(0) 推荐(0) 编辑
设置 electron 透明背景,electron 设置透明背景无效
摘要:Windows electron@11.0.0 失效原因: browserWindow.once('ready-to-show', () => { browserWindow.show(); browserWindow.maximize(); // 最大化显示,先 show 再最大化,否则透明背景无 阅读全文
posted @ 2021-09-17 23:57 W1N9s 阅读(1951) 评论(0) 推荐(0) 编辑
electron 截图,两种方式:desktopCapturer.getSources 与 navigator.mediaDevices.getUserMedia
摘要:1 // In the renderer process. 2 3 import { desktopCapturer } from 'electron'; 4 import { screen } from '@electron/remote'; 5 6 export async function c 阅读全文
posted @ 2021-06-26 17:22 W1N9s 阅读(2181) 评论(0) 推荐(0) 编辑
解决 electron 无法加载 vue-devtools
摘要:1. BrowserWindow.addDevToolsExtension(path) 在 Electron 13 版本已移除,采用 session.defaultSession.loadExtension(path) 方式加载 2. 配置 import { session } from 'elec 阅读全文
posted @ 2021-06-20 13:25 W1N9s 阅读(2202) 评论(0) 推荐(0) 编辑
@electron/remote Menu click事件失效
摘要:检查是否移除了所有监听,比如: ipcRenderer.removeAllListeners(); 会造成 click 事件失效。 相关链接: 1. https://github.com/electron/remote 阅读全文
posted @ 2021-05-06 21:31 W1N9s 阅读(353) 评论(0) 推荐(0) 编辑
修改 vue-cli-plugin-electron-builder 入口
摘要:看源码 在 vue.config.js 里增加配置 module.exports = { pluginOptions: { electronBuilder: { mainProcessFile: 'src/mainProcess/entry.js', } } }; 重启应用。 注意: 1. pack 阅读全文
posted @ 2021-05-05 13:05 W1N9s 阅读(787) 评论(0) 推荐(1) 编辑
vue cli3 在 electron 下无法访问 node 模块
摘要:在 vue.config.js 里增加配置: module.exports = { pluginOptions: { electronBuilder: { nodeIntegration: true } } } 参考链接: https://nklayman.github.io/vue-cli-plu 阅读全文
posted @ 2021-05-04 15:20 W1N9s 阅读(369) 评论(0) 推荐(0) 编辑
electron electron-forge make 打包报错
摘要:报错步骤:Making for target: squirrel - On platform: win32 - For arch: x64 解决方法:填写 package.json 里的 description 和 author Authors is required.Description is 阅读全文
posted @ 2021-05-04 12:13 W1N9s 阅读(1911) 评论(0) 推荐(1) 编辑
electron-builder打包配置
摘要:1 { 2 "name": "demo", 3 "version": "0.0.1", 4 "build": { // electron-builder配置 5 "productName":"xxxx",//项目名 这也是生成的exe文件的前缀名 6 "appId": "xxxxx",//包名 7 阅读全文
posted @ 2021-01-31 12:05 W1N9s 阅读(1056) 评论(0) 推荐(0) 编辑
electron-vue 添加 scss 全局变量
摘要:1. 安装模块:npm install sass-resources-loader 2. 修改配置文件: 找到 .eleectron-vue/webpack.renderer.config.js 文件 改为 阅读全文
posted @ 2020-07-30 18:28 W1N9s 阅读(893) 评论(1) 推荐(0) 编辑

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

点击右上角即可分享
微信分享提示