上一页 1 ··· 9 10 11 12 13 14 15 16 17 ··· 19 下一页
摘要: electron将网页转成pdf使用方法contents.printToPDF(options),具体使用方法查看官网: https://www.electronjs.org/zh/docs/latest/api/web-contents#contentsprinttopdfoptions 在转化过 阅读全文
posted @ 2023-01-17 09:03 ziff123 阅读(842) 评论(0) 推荐(0)
摘要: 1、electron与nodejs安装的版本必须对应,对应表:https://www.yuque.com/u34495/mivcfg/lb1lwt68fhg2qgw7 我装的node版本是:v16.14.2,elcctron版本是:19.1.3 2、安装 ffi-napi npm install f 阅读全文
posted @ 2023-01-13 15:08 ziff123 阅读(568) 评论(1) 推荐(0)
摘要: electron 发送http请求,参考官网api: https://www.electronjs.org/zh/docs/latest/api/net#netrequestoptions https://www.electronjs.org/zh/docs/latest/api/client-re 阅读全文
posted @ 2023-01-13 11:09 ziff123 阅读(888) 评论(0) 推荐(0)
摘要: electron 开启本地http服务,让第三方可以直接通过webapi的方式访问 1、新建server.js 1 const os = require('os'); 2 const http = require('http'); 3 4 5 let server; 6 7 function ope 阅读全文
posted @ 2023-01-13 10:31 ziff123 阅读(3238) 评论(0) 推荐(0)
摘要: 在electron里面运行的页面,异常请求的时候,发生跨域问题。在普通浏览器上正常运行。解决办法: 在webPreferences上添加webSecurity: false webPreferences:{ webSecurity: false }, 同时在文件的最顶端添加: app.command 阅读全文
posted @ 2023-01-11 17:25 ziff123 阅读(1325) 评论(0) 推荐(1)
摘要: Electron因为开启了node集成才能实现和网页的通信,引入jQuery较高版本它的模块化定义(基于CommonJS)和Electron的内部机制冲突了。目前提供以下两个方案: 1、使用jQuery 1.8.2版本,更高版本还没有测试。 2、添加下面的代码以后,再引入jQuery的高版本。注意前 阅读全文
posted @ 2023-01-11 10:43 ziff123 阅读(152) 评论(0) 推荐(0)
摘要: electron 报@electron/remote is disabled for this WebContents. Call require("@electron/remote/main").enable(webContents) to enable it. 在创建窗口地方加上这句: requ 阅读全文
posted @ 2023-01-10 17:09 ziff123 阅读(383) 评论(0) 推荐(0)
摘要: electron 报 Fatal error in V8: v8_ArrayBuffer_NewBackingStore When the V8 Sandbox is enabled, ArrayBuffer backing stores must be allocated inside the s 阅读全文
posted @ 2023-01-06 14:37 ziff123 阅读(389) 评论(0) 推荐(0)
摘要: 1、Uncaught Error: Dynamic Linking Error: Win32 error 126 DLL引用的路径错误,检查下DLL的路径是否正确 2、Uncaught Error: Dynamic Linking Error: Win32 error 193 DLL位数不对,根据系 阅读全文
posted @ 2023-01-06 14:14 ziff123 阅读(1622) 评论(0) 推荐(0)
摘要: 环境:"electron": "^22.0.0"、麒麟系统V10(sp1) 1、思路:利用nodejs调linux的打印命令lp打印 2、代码: const childProcess = require("child_process"); const sp = childProcess.exec(' 阅读全文
posted @ 2022-12-27 14:31 ziff123 阅读(411) 评论(0) 推荐(0)
上一页 1 ··· 9 10 11 12 13 14 15 16 17 ··· 19 下一页