上一页 1 ··· 8 9 10 11 12 13 14 15 16 ··· 29 下一页
摘要: 项目代码 https://github.com/electron-in-action/clipmaster 创建Tray main.js const path = require('path'); const { app, Menu, Tray } = require('electron'); le 阅读全文
posted @ 2020-06-17 16:40 easy5 阅读(486) 评论(0) 推荐(0)
摘要: 在渲染进程(UI界面)中使用shell模块 //在文件管理器中打开 const { ..., shell } = require('electron'); const showFile = () => { if (!filePath) { return alert('This file has no 阅读全文
posted @ 2020-06-16 17:38 easy5 阅读(515) 评论(3) 推荐(1)
摘要: 应用菜单 替换设置应用程序菜单 创建应用菜单模块 创建一个新的名为application-menu.js文件, const { app, BrowseWindow, Menu, shell } = require('electron'); const mainProcess = require('. 阅读全文
posted @ 2020-06-16 02:18 easy5 阅读(287) 评论(0) 推荐(0)
摘要: 项目代码 https://github.com/electron-in-action/firesale/tree/chapter-6 #代码解析 窗口标题 根据文件路径获取文件名: path.basename(filePath) 设置窗口标题:currentWindow.setTitle(title 阅读全文
posted @ 2020-06-12 14:46 easy5 阅读(496) 评论(0) 推荐(0)
摘要: 项目代码 https://github.com/electron-in-action/firesale/tree/chapter-5 代码解析 重构打开文件函数 添加参数, targetWindow 表示当前窗口 main.js const openFile = exports.openFile = 阅读全文
posted @ 2020-06-12 12:18 easy5 阅读(473) 评论(0) 推荐(0)
摘要: electron集成vue 可供的选择 Vue CLI Plugin Electron Builder 开源地址;https://github.com/nklayman/vue-cli-plugin-electron-builder electron-vue 开源地址:https://github. 阅读全文
posted @ 2020-06-10 12:50 easy5 阅读(170) 评论(0) 推荐(0)
摘要: 项目源码 https://github.com/electron-in-action/firesale/tree/chapter-4 目标 eletron dialog模块 主进程与渲染进程通信 electron remote模块 webContents渲染进程发送消息 electron ipcRe 阅读全文
posted @ 2020-06-10 11:24 easy5 阅读(502) 评论(0) 推荐(0)
摘要: 项目简介 markdown 转化为 html 项目结构 项目结构 第三方库 Maked 第三方库Marked:用于实现 MakeDown转化为 HTML npm install marked 项目代码 https://github.com/electron-in-action/firesale 代码 阅读全文
posted @ 2020-06-09 22:22 easy5 阅读(306) 评论(0) 推荐(0)
摘要: #《Electron 跨平台开发实战》系列 官方源码地址:https://github.com/electron-in-action/ 我的源码地址:https://github.com/K-Artisan/electron-in-action-book-note 项目BookMark 源码地址:h 阅读全文
posted @ 2020-06-09 22:09 easy5 阅读(896) 评论(0) 推荐(0)
摘要: 主进程和渲染进程 在electron中,GUI的相关的模块仅在主进程中可用 若渲染进程要完成GUI操作,有两种方式: 渲染进程向主进程发送消息,让主进程完成相应的操作 通过渲染进程的remote模块完成相应的操作 调试主进程 在VSC中,点击左侧的菜单栏的 debug图标,添加launch.json 阅读全文
posted @ 2020-06-09 21:32 easy5 阅读(316) 评论(0) 推荐(0)
上一页 1 ··· 8 9 10 11 12 13 14 15 16 ··· 29 下一页