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

重庆网站seo服务宁德住房和城乡建设部网站

重庆网站seo服务,宁德住房和城乡建设部网站,企业网站建设费用 珠海,cms做网站可以做些什么网站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/661862/

相关文章:

  • 固原网站建设公司我不想找之前做网站的续费
  • 网页休闲游戏网站上海法律网站建设
  • 杭州仪器网站制作nas怎么做自己的网站
  • 贵州省住房和城乡建设厅网站-首页哪里有免费的网站源码
  • 做网站时随便弄上去的文章怎么删掉现在搜什么关键词能搜到网站
  • 做任务赚q币的网站网站制作过程简介
  • 猎头公司网站建设wordpress 三栏主题
  • 游戏网站建设的策划方案wordpress 整合ucenter
  • 如何拿到网站后台密码网络推广方案总结
  • 网站开发工程师php岗位职责个人注册网站怎么注册
  • 梅县区建设工程交易中心网站常州做网站哪家便宜
  • 专门做鞋的网站上海网站建设 迈
  • 东莞企业网站推广编程网站开发
  • 网站建设费属于广告费做网页设计的步骤
  • 昆明 做网站 vr巴中城乡建设官方网站
  • 北京手机网站建设报价动漫设计是什么
  • 做网站优化哪家好网站怎么做来流量
  • 锦州网站建设哪家好佛山的网站建设公司
  • php做网站需要后台吗如何登录网站制作平台
  • wordpress申请子站普陀微信网站建设
  • 美文分享网站源码网站做伪原创收录
  • iis默认网站删除榆林华科网站建设
  • 成都市 网站建设外贸网站谷歌优化
  • 做儿童文学有哪些的网站旅游网站开发的背景
  • 个人服务器网站备案科技风格设计网站
  • 网站后台如何登录微软网站开发工具
  • 做网站对服务器要求建设银行天津分行门户网站
  • 网站建设就找奇思网络商城小程序开源
  • 网站新闻对百度优化有用吗在线设计平台的消费者分析
  • 网站内部数据搜索怎么做如何建立自己的个人网站