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

站群建站就要外贸人才网论坛

站群建站,就要外贸人才网论坛,wordpress 律师事务所模板,wordpress自定义关键词链接文章electron 开发时最麻烦就是electron版本和node版本的选择和正确安装 electron 用npm安装时太慢容易报错#xff0c;建议用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 htmlheadmeta charsetUTF-8 /titleHello World!/titlelink relstylesheet hrefindex.css //headbodyh1 Hello World!/h1pWelcome to your Electron application./ph1Hello World!/h1We are using Node.js span idnode-version/span,Chromium span idchrome-version/span,and Electron span idelectron-version/span.!-- You can also require other files to run in this process --!-- script src./renderer.js/script --/bodyscript// 引用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.w-s-a.com/news/35362/

相关文章:

  • 惠州技术支持网站建设百度怎样注册免费的网站
  • 无锡哪里有做网站的公司泸州网站建设公司
  • 怎么进行网站推广jsp可以做那些小网站
  • 懒人手机网站wordpress修改秒速
  • WordPress资讯网站用花生壳做网站
  • 关于营销方面的网站建设网站怎么克隆
  • 站长网seo综合查询工具电商公司简介
  • 全能网站建设教程广告制作公司需要什么设备
  • 汽车行业做网站网站改版seo建议
  • 建设职业注册中心网站photoshop属于什么软件
  • 公司网站展示有哪些wordpress工单
  • iis新建网站seo是做什么工作的
  • 临沂网站建设厂家做外贸的女生现状
  • 电子商务网站建设实践临沂做网站的
  • 网站职能建设论文做外贸都有哪些网站
  • 网站建设项目需求分析房地产网站源码
  • 网站充值提现公司账务怎么做中国能建设计公司网站
  • 网站信息资源建设包括哪些网站网站做维护
  • 网站性能优化的方法有哪些建设施工合同网站
  • 郑州建设企业网站山西省住房和城乡建设厅网站
  • 做网站的去哪找客户正规制作网站公司
  • 网站代理访问是什么意思外国优秀设计网站
  • 合肥个人建站模板网络技术服务有限公司
  • 做网站什么公司好dw企业网站开发教程
  • 怎么做自己的个人网站宝安网站设计哪家最好
  • 浩博建设集团网站站长网站统计
  • 电商网站开发视频seo排名优化方式方法
  • 宿迁市住房城乡建设局网站wordpress纯图片主题
  • 广州建设网站 公司湖北省建设信息网官网
  • 网站建立时间查询做百度移动网站优化排