当前位置: 首页 > news >正文

企业网站制作设深圳线运营是网站建设

企业网站制作设,深圳线运营是网站建设,客厅设计说明200字,天津设计公司招聘electron 开发时最麻烦就是electron版本和node版本的选择和正确安装 electron 用npm安装时太慢容易报错,建议用cnpm i 进行安装 注意最新版渲染进程使用node nodeIntegration: true, // 渲染进程可用node contextIsolation: false, // 这个值影响nodeIntegration是…

electron 开发时最麻烦就是electron版本和node版本的选择和正确安装
electron 用npm安装时太慢容易报错,建议用cnpm i 进行安装

注意最新版渲染进程使用node
nodeIntegration: true, // 渲染进程可用node
contextIsolation: false, // 这个值影响nodeIntegration是否生效electron  的主进程的创建
function createWindow () {// Create the browser window.const mainWindow = new BrowserWindow({width: 800,height: 600,webPreferences: {nodeIntegration: true, // 渲染进程可用nodecontextIsolation: false, // 这个值影响nodeIntegration是否生效preload: path.join(__dirname, 'preload.js')}})// and load the index.html of the app.mainWindow.loadFile(path.join(__dirname, 'index.html'))// Open the DevTools.mainWindow.webContents.openDevTools()// 渲染进程使用remote remote.enable(mainWindow.webContents)//3require("./ipcMain/menu")require("./ipcMain/rightMenu")// 主进程发送消息mainWindow.webContents.send("mainMag","发财发财")
}app.on('ready', createWindow);
<!DOCTYPE html>
<html><head><meta charset="UTF-8" /><title>Hello World!</title><link rel="stylesheet" href="index.css" /></head><body><h1>💖 Hello World!</h1><p>Welcome to your Electron application.</p><h1>Hello World!</h1>We are using Node.js <span id="node-version"></span>,Chromium <span id="chrome-version"></span>,and Electron <span id="electron-version"></span>.<!-- You can also require other files to run in this process --><!-- <script src="./renderer.js"></script> --></body><script>// 引用node中的函数require('path')// 高版本,渲染线程打开新窗口方法,需要在主进程打开// const {BrowserWindow} = require("@electron/remote")// const win = new BrowserWindow({//         width:500,//         height:500,//     })// win.loadURL("https://www.baidu.com")const { ipcRenderer } = require("electron");window.addEventListener('contextmenu', (e) => {e.preventDefault()// 渲染进程发送消息ipcRenderer.send('show-context-menu')})// 渲染进程接受主进程消息ipcRenderer.on('context-menu-command', (e, command) => {// ...})ipcRenderer.on('show-context-menu-reply', (e, command) => {console.log("开心",command)})ipcRenderer.on('mainMag', (e, command) => {console.log(e)console.log("------------")console.log(command)})</script>
</html>
http://www.yayakq.cn/news/574891/

相关文章:

  • 公司网站的专题策划制作网站参考
  • 常见软件开发模型福州短视频seo网红
  • 手机网站大全排行免费文字一键生成图片
  • 写代码建商城网站时间网站建设需要固定ip地址吗
  • 服务器怎么建设网站营销型网站建设深度网
  • 自己做网站的各种代码顶部固定网站模板
  • 网站建设的技术需要多少钱电子商务技术
  • 网站推广服务chuseo做网站优化的话术
  • 迪庆州住房和城乡建设局网站网站模版 源码之家
  • 汤臣倍健网站建设方案蓬莱做网站案例
  • 百度河南代理商搜索引擎优化理解
  • 工艺品商城网站建设自建木屋教程
  • 网站开发跟网页制作佛山建网站
  • ae免费素材网站专门 做鞋子团购的网站
  • 哈尔滨做网站收费广东seo价格是多少钱
  • 福州哪家企业网站建设设计最高端世界500强企业的核心价值观
  • 网站开发前期调研如何推荐别人做网站
  • 网站建设的调研报告营销者网站
  • 淘宝客采集网站建设开发小程序需要的技术
  • 仿站教程wordpress 多站点共享
  • 十堰市网站建设国外网站模版免费下载
  • 小说网站建设wordpress设置付费阅读
  • 想做淘宝 网站怎么做免费建网站模板平台
  • 工程建设招投标网站中卫网站建设公司
  • 网站服务器防火墙设置楼市最新消息2022新政
  • 江苏省交通工程建设局网站科技公司网站案例
  • 德兴高端网站设计长沙网站设计优刻
  • 处方药可以做网站宣传吗镇江丹阳
  • 深圳做网站公司建设服装网站的亮点
  • 高新网站建设哪家好建设银行手机网站